Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] complex where statement

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] complex where statement
 Login/Join
 
Member
posted
Good day,
I am trying to setup a conditional where statement on a sql file. In my non-IBI software I set it up like:
If company = 512
where businessunit <> 51299
where businessunit <> 51291
end if

I'm trying to do this within webFOCUS but would like some pointers to how to do it.
I know I cannot use an if within a where statement. I know that DM only use amber variables, so I cannot use the table value company field. Do you have any pointers? Thanks.

This message has been edited. Last edited by: Kerry,


Webfocus 7.6
as/400
PDF, Excel
 
Posts: 10 | Location: Durant, Oklahoma | Registered: May 07, 2010Report This Post
Expert
posted Hide Post
What kind of SQL accessible DBMS allows for an IF statement with embedded WHERE statements?

Would this translate to:

WHERE 
COMPANY = 512 
AND NOT BUSINESSUNIT IN (51299, 51291)


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
you're right, what dbms would allow that? I had to go back to my report software and get a quick refresher of what I did. It reads the table then calls another section of the report to process the company it just read. So it processes each company individually, I'm looking to do a similar thing within the webFOCUS tools.
if company = 512
where business unit not in (51299, 51291)
else if company = 513
where business unit not in (51399, 51391)

etc.


Webfocus 7.6
as/400
PDF, Excel
 
Posts: 10 | Location: Durant, Oklahoma | Registered: May 07, 2010Report This Post
Expert
posted Hide Post
WHERE 
(COMPANY EQ 512 AND NOT BUSINESSUNIT IN (51299, 51291)) OR
(COMPANY EQ 513 AND NOT BUSINESSUNIT IN (51399, 51391)) OR
...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Dang....I hate when I make things more difficult then I should. thanks.


Webfocus 7.6
as/400
PDF, Excel
 
Posts: 10 | Location: Durant, Oklahoma | Registered: May 07, 2010Report This Post
Platinum Member
posted Hide Post
What about
WHERE
COMPANY IN (512,513) AND NOT BUSINESSUNIT IN (51299, 51291)
 
Posts: 140 | Location: Adelaide South Australia | Registered: October 27, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] complex where statement

Copyright © 1996-2020 Information Builders