Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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"
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