Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CLOSED] IF Condition usage in where clause
Go
New
Search
Notify
Tools
Reply
  
[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, 2015Reply With QuoteReport 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.01
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 531 | Location: Baltimore, MD | Registered: July 06, 2006Reply With QuoteReport 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, 2015Reply With QuoteReport 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.01
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 531 | Location: Baltimore, MD | Registered: July 06, 2006Reply With QuoteReport This Post
  Powered by Social Strata  
 

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-2018 Information Builders, leaders in enterprise business intelligence.