Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello , i have this code that is worked in qlikview but when i changed to qliksense he doesn't work :
MOIS_OBS:
SQL WITH
Select '(' + substring(MOIS_OBS,2,len(MOIS_OBS)) + ')' as RESULT From (Select (Select ',' + '' + mois_obs + ''
From TAB_CALENDRIER_Obs
Cross Join MOIS_MAX
Where mois_obs=cast(year(left(MOIS,4))-5 as varchar)+'12'
FOR XML PATH('')) AS MOIS_OBSS)req;
If ENV='DEV' or ENV='PPROD' Then;
SET p_MOIS_OBS=('FALSE');
SET p_MOIS_OBS_12=('FALSE');
SET p_MOIS_OBS_N1_12=('FALSE');
Else;
LET p_MOIS_OBS=Peek('RESULT');
LET p_MOIS_OBS_12='(''' & Mid(Peek('RESULT'),3,4) & '12' & ''')';
LET p_MOIS_OBS_N1_12='(''' & text(Mid(Peek('RESULT'),3,4)-1 & '12') & ''')';
End if;
DROP TABLE MOIS_OBS;
Can someone help me please to change it thanks
What is the error?
Connector reply error: ErrorSource: OraOLEDB, ErrorMsg: ORA-00904: "YEAR" : Invalid identifier
HI @taz803 ,
if I remember correctly the FOR XML PATH('')) is specific for Microsoft SQL Server.
On the other hand the OraOLEDB, ErrorMsg: ORA-00904 error is related to an Oracle Database.
I suggest you check the connection properties and confirm the target database type.
Regards
Fabiano