Focal Point
[SOLVED] DECODE

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5071009603

November 13, 2008, 04:28 PM
DMA
[SOLVED] DECODE
I'm trying to order the days of the week by day (Sunday-Saturday), I keep getting it in alphabetical order. I'm trying to use a decode function as follows:
WEEKDAY/A10 = DECODE DAY_OF_WEEK('1' 'Sunday'
'2' 'Monday'
'3' 'Tuesday'
'4' 'Wednesday'
'5' 'Thursday'
'6' 'Friday'
'7' 'Saturday'ELSE ' ');
I'm not sure if I'm coding it correctly, also where I'm supposed to place it in the code.

Any input would help.

This message has been edited. Last edited by: DMA,


WebFOCUS v. 7.6.8 || Windows XP || Format Output: HTML, PDF, EXCEL
November 13, 2008, 04:54 PM
Francis Mariani
You're getting your result in alphabetical order because your program probably does:

BY WEEKDAY

it should do:
BY DAY_OF_WEEK NOPRINT
BY WEEKDAY



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server