Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Jacob
Contributor III
Contributor III

SQL IsNull

Hi All ,

I am fetching data from SQL.

When i am loading below script i am getting error. 

Srcript:

 

Table;
LOAD  data,
---
---- sql SELECT DATAID,DECODE(NVL(STORE_NUMBER,'*'),'*',SAGE_WH,STORE_NUMBER) AS STORE_NUMBER,SUPERVISOR,AREA,COMPANY,STATUS,CATEGORY FROM list
where REGION IN ('USA','UK','IND','PAK','AUS') AND COMPANY = 'RETAIL' order by STATUS desc ;

 

 

Error:

 

Connector reply error: SQL##f - SqlState: 37000, ErrorCode: 195, ErrorMsg: [Microsoft][ODBC SQL Server Driver][SQL Server]'NVL' is not a recognized built-in function name.: sql SELECT DATAID,DECODE(NVL(STORE_NUMBER,'*'),'*',SAGE_WH,STORE_NUMBER) AS STORE_NUMBER,SUPERVISOR,AREA,COMPANY,STATUS,CATEGORY FROM list where REGION IN ('USA','UK','IND','PAK','AUS') AND COMPANY = 'RETAIL' order by STATUS desc

Labels (3)
1 Reply
swapniltaz
Contributor III
Contributor III

The NVL( ) function is available in Oracle, and not in  SQL Server.

This function is used to replace NULL value with another value and the ISNULL Function in SQL Server is used to obtain same functionality