Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
taz803
Contributor III
Contributor III

From QlikView to QlikSense

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 

Labels (5)
3 Replies
Lisa_Sun
Support
Support

What is the error? 

 

Help users find answers! Don't forget to mark a solution that worked for you! If already marked, give it a thumbs up!
taz803
Contributor III
Contributor III
Author

Connector reply error: ErrorSource: OraOLEDB, ErrorMsg: ORA-00904: "YEAR" :  Invalid identifier

 

Fabiano_Martino_Intelco
Partner - Creator II
Partner - Creator II

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