Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
pradeepkendur
New Contributor

Getting missing right parenthesis error while connecting to data source.

HIERARCHY:

SQL SELECT LEVEL1_ORG_NODE_ID,      LEVEL1_ORG_NODE_DESCRIPTION,      LEVEL2_ORG_NODE_ID,      LEVEL2_ORG_NODE_DESCRIPTION,

       LEVEL3_ORG_NODE_ID,      LEVEL3_ORG_NODE_DESCRIPTION,      LEVEL4_ORG_NODE_ID,

         LEVEL7_ORG_NODE_DESCRIPTION,      RM_ORG_NODE_ID,      RM_ORG_NODE_DESCRIPTION,

       if(len(PORTFOLIO_CODE)=0, null(),PORTFOLIO_CODE) as PORTFOLIO_CODE FROM $(CIBTDS).AGN_HIERARCHY_MVW;

   

          

I am getting "SQL##f - SqlState: S1000, ErrorCode: 907, ErrorMsg: [Oracle][ODBC][Ora]ORA-00907: missing right parenthesis"

1 Reply

Re: Getting missing right parenthesis error while connecting to data source.

if(len(PORTFOLIO_CODE)=0, null(),PORTFOLIO_CODE) as PORTFOLIO_CODE

Afaik this isn't valid SQL for Oracle. Try:

CASE WHEN Length(PORTFOLIO_CODE)>0 THEN PORTFOLIO_CODE END as PORTFOLIO_CODE


talk is cheap, supply exceeds demand
Community Browser