Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IIF character length?
Message
From
03/06/2002 08:14:51
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
IIF character length?
Miscellaneous
Thread ID:
00663995
Message ID:
00663995
Views:
63
I'm using the following statement in SQL: (VFP 5.0, selecting from a foxpro database.)

select a.citat as TICKUPD, IIF(a.pflag=.t.,"T","F") as CASE_FLAG, IIF(a.acc=.t.,"Y","N") as ACC, ;
a.chem, IIF(empty(a.dtrefu),"''","'" + DTOC(a.dtrefu) + "'") as DTREFU, ;
IIF(empty(a.dtdisp),"''","'" + DTOC(a.dtdisp) + "'") as GFC_DDATE, ;
IIF(INLIST(a.DISPO,"1","2","7"),a.DISPO,"") as MAST_DISPO, ;
IIF(empty(a.dtcompl),"''","'" + DTOC(a.dtcompl) + "'") as DTCOMPL, ;
a.MECOMPL, ;
IIF(a.CANID=.t.,"Y","N") as CANID, IIF(empty(a.dtsent),"''","'" + DTOC(a.dtsent) + "'") as DTSENT, ;
IIF(empty(a.dtadd),"''","'" + DTOC(a.dtadd) + "'") as DTADD, ;
IIF(empty(a.dtchange),"''","'" + DTOC(a.dtchange) + "'") as DTCHANGE, b.tick_num from mevmast

For some reason, the results it is giving me for the date fields DTCOMPL, DTSENT, DTADD and DTCHANGE are coming out as two characters long-- i.e. if the date value is 02/05/1999 the result of the IIF seems to become '0
If it is 11/15/2000 it becomes '1
And so on. However, the GFC_DDATE IIF which is written identically works fine. Any ideas?
Next
Reply
Map
View

Click here to load this message in the networking platform