April 19, 2010, 11:04 AM
vkrugmanUsing NVL sql function in MRE WF- problems
Hello!
I need to use nvl function and I get this error
(FOC1400) SQLCODE IS 195 (HEX: 000000C3) XOPEN: 42000
: Microsoft OLE DB Provider for SQL Server: [42000] 'NVL' is not a recogni
: zed built-in function name.
here is my data:
SALES TAB2_SALES
14077248.69 3016845.99
. 23071772.90
I need following: decode(SALES,null,TAB2_SALES,SALES). I figured that
decode is not working in my version of FW as well, so I will be useng CASE and "SALES" column is a number, so I need NVL . What would be a correct syntex to code that Logic?
thank you.
April 19, 2010, 02:14 PM
Dan SatchellIf you use CASE logic, is NVL needed?
SELECT ... ,
CASE
WHEN SALES IS NULL THEN TAB2_SALES ELSE SALES
END AS SALES
FROM ...
ORDER BY ... ;