July 07, 2004, 07:16 PMjmdoyl1
Decode translation to sql
Why doesn't the WebFOCUS interface translate the following types of statements to CASE statements in SQL?
DEFINE... DEPTNM/A11=IF CDIV EQ �A00� THEN �CORPORATE� ELSE
IF CDIV EQ �B01� THEN �NORTH'
DEFINE...DEPTNM/A11=DECODE CDIV (�A00� �CORPORATE�
SELECT FIRSTNME, EMPLOYEE.SALARY,
WHEN 'A00' THEN 'CORP'
WHEN 'B01' THEN 'NORTH'
ELSE 'OTHER' END AS DEPTNM,
Using DB2 8.1, WF 5.2.3 Developer Studio.
July 11, 2004, 06:21 AMPiipster
Are you looking for a technique to improve the efficiency of your code?
July 11, 2004, 04:13 PMGCohen
The reason is that the rbdms turns off the
optimization, and the result is a much slower
The second reason is that when WebFocus is on another computer we want to divide the work between WebFocus and the RDBMS. Pushing everything to the rdbms overloads it when 500 tasks are running simultaneously, so any load reduction is useful.
July 12, 2004, 02:55 PMjmdoyl1
Thanks. Data Architect wanted to know why we did translate it so was looking for a good response back.