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  iWay Software Product Forum on Focal Point    [CLOSED] IF Condition usage in where clause

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] IF Condition usage in where clause
 Login/Join
 
Member
posted
Hi,

I am building a chart and want to use parameters.
One of the parameter should be used as following
If parameter value is "ALL" then query should not include that parameter, otherwise query should include value in the parameter.

GRAPH FILE ibiapp/dq_dashboard_chart1
-* Created by Info Assist for Graph
SUM COMPUTE Compute_1/D12.2=AVE.DQ_DASHBOARD_CHART1.DQ_DASHBOARD_CHART1.AVG_SCORE * 10 ; AS 'General Ticket'
BY DQ_DASHBOARD_CHART1.DQ_DASHBOARD_CHART1.ADDENDUM
ACROSS Define_1
WHERE Define_1 GT DT('&WEEK1. (|FORMAT=HMDYY-). From Date eg 01-01-2015..') AND Define_1 LT DT('&WEEK2. (|FORMAT=HMDYY-). To Date eg 01-01-2015..')
AND (IF (&CARD_ACCPTR_BUS_CD. (|FORMAT=A4V).MCC.) NE ''ALL'' THEN DQ_DASHBOARD_CHART1.DQ_DASHBOARD_CHART1.CARD_ACCPTR_BUS_CD EQ ( &CARD_ACCPTR_BUS_CD. (|FORMAT=A4V).MCC. )); HEADING

This AND condition is giving me error.
Please suggest usage of IF else condition in where clause.

Thank you.

This message has been edited. Last edited by: <Kathryn Henning>,


webfocus 8.1
windows, html
 
Posts: 8 | Registered: April 21, 2015Report This Post
Master
posted Hide Post
Please show the error message. I don't think it likes 'AND IF...'


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Member
posted Hide Post
quote:
AND (IF (&CARD_ACCPTR_BUS_CD. (|FORMAT=A4V).MCC.) NE ''ALL'' THEN DQ_DASHBOARD_CHART1.DQ_DASHBOARD_CHART1.CARD_ACCPTR_BUS_CD EQ ( &CARD_ACCPTR_BUS_CD. (|FORMAT=A4V).MCC. ));


You are right it does not like the AND there.
I want to know the usage of IF in where clause AND condition.

Parsing error : Encountered AND at line 16, column 1


webfocus 8.1
windows, html
 
Posts: 8 | Registered: April 21, 2015Report This Post
Master
posted Hide Post
Just test where syntax with the car file and some made up values
Also, look at WHERE syntax in technical documentation.


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] IF Condition usage in where clause

Copyright © 1996-2020 Information Builders