Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Jacob
Contributor III
Contributor III

DECODE in SQL

Hi All,

I am using Decode function in my script but i am an error.

 

sql SELECT 

DECODE(ISNULL(STORE_NUMBER,'*'),'*',SAGE_WH,STORE_NUMBER) AS STORE_NUMBER,
.......
.....
From ......

 

 

Error 

 

Connector reply error: SQL##f - SqlState: 37000, ErrorCode: 195, ErrorMsg: [Microsoft][ODBC SQL Server Driver][SQL Server]'DECODE' is not a recognized built-in function name.: sql SELECT DECODE(ISNULL(STORE_NUMBER,'*'),'*',SAGE_WH,STORE_NUMBER) AS STORE_NUMBER, 

 

 

Labels (2)
1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

DECODE() is not a valid function in SQL Server. Use a CASE statement instead
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein