Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
taz803
Contributor III
Contributor III

Why qlik don't know year and LEFT function

hello team

this is my request : YEAR(LEFT(mois_obs,4))-5 as year_test

i have this error msg from qliksense :

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

and even i delete year the msg come : 

Connector reply error: ErrorSource: OraOLEDB, ErrorMsg: ORA-00904: "LEFT" : invalid identifier 

how can i handle it

 

Labels (4)
4 Replies
Lokesh_5045
Creator
Creator

Left function returns string. try using num or num# functions instead year. Assign it to year_test.

For instance, num(Left(String, 4)).

Or
MVP
MVP

This is not related to Qlik. You are getting an error message from your connection to the database, presumably due to incorrect usage of functions in an SQL query.

taz803
Contributor III
Contributor III
Author

i changed for : 

cast(YEAR(LEFT(mois_obs,4))-5 as varchar) as year_test

Connector reply error: ErrorSource: OraOLEDB, ErrorMsg: ORA-00906: missing left parenthesis

Lokesh_5045
Creator
Creator

Thank you @Or . I overlooked the error message regarding connector error.