Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using IIF in Select
Message
From
15/04/2005 00:20:18
Randy Wessels
Screentek Business Solutions, Llc.
Phoenix, Arizona, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01004977
Message ID:
01004986
Views:
22
Thank you!

>
SELECT invno, IIF(usesr2,salesrep2, SPACE(LEN(salesrep2))) FROM invpost
>* or
>SELECT invno, PADR(IIF(usesr2,salesrep2,''), LEN(salesrep2)) FROM invpost
>
>
>>SELECT invno, IIF(usesr2,salesrep2,'') FROM invpost
>>
>>The above select returns only the first character of the salesrep2 field. I think that is because the usesr2 is a Logical field. How can I return the full length of the salesrep2 field?
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform