Hi MIke,
The data types of the first 2 args must match, which they do.
The data types of the last 2 args must match, which they do not.
But I don't know why your reverse works??
try changing null to a zero value as double
Bernie Lis
----- Original Message -----
From: Ramsour Mike
To: RBASE-L Mailing List
Sent: Wednesday, October 29, 2008 10:35 AM
Subject: [RBASE-L] - IFEQ question
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