Focal Point
Using NVL sql function in MRE WF- problems

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/409107224

April 19, 2010, 11:04 AM
vkrugman
Using 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.


Valeriya

WebFOCUS 764 Servlet - MRE/Dashboard/Self Service/ReportCaster - Windows 2000
April 19, 2010, 02:14 PM
Dan Satchell
If you use CASE logic, is NVL needed?

SELECT ... , 
 CASE 
  WHEN SALES IS NULL THEN TAB2_SALES ELSE SALES
 END AS SALES
 FROM ...
 ORDER BY ... ;



WebFOCUS 7.7.05