Scenario:
SET VAR vzero DOUBLE = 0
SET VAR vnull DOUBLE = NULL
Column LSAVG data type DOUBLE
Simple logic test. If the value of LSAVG is 0 then display 'YES' otherwise
display 'NO'
select lsavg,(IFEQ(LSAVG,.VZERO,'YES','NO')) from color_line_study wher
lsavg = 0
lsavg (IFEQ(LSAVG,.VZ
--------------- ---------------
0. YES
0. YES
0. YES
0. YES
0. YES
Then why does this not work?:
select lsavg,(IFEQ(LSAVG, .VZERO, .VNULL, LSAVG)) from color_line_study
where lsavg = 0
lsavg (IFEQ(LSAVG,.VZ
--------------- ---------------
0. 0.
0. 0.
0. 0.
0. 0.
0. 0.
The intent is to display NULL when the value of the lsavg field equals 0.
The reverse works OK:
select lsavg,(IFEQ(LSAVG,.VZERO,.VNULL,LSAVG)) from color_line_study wher
lsavg > 0 and limit = 4
lsavg (IFEQ(LSAVG,.VZ
--------------- ---------------
41.0823 41.0823
41.0799 41.0799
41.0823 41.0823
41.079 41.079
Thoughts anyone?
Mike Ramsour
AK Steel Coshocton Works
Quality Department
Phone/VMS: 740-829-4340