It looks like ZERO is ON. SET ZERO OFF and see what happens. Also, if LSAVG is ever null then the expr. will evaluate to null with ZERO OFF and 0.0 with ZERO ON.
Regards, Stephen Markson ForenSys The Forensic Systems Group www.ForenSys.ca <http://www.forensys.ca/> 416 512 6950 _____ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ramsour Mike Sent: October 29, 2008 10:36 AM To: RBASE-L Mailing List 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 No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.8.4/1749 - Release Date: 10/29/2008 7:45 AM

