Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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 (5)
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