Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IIf() in SQL-Select???
Message
From
23/08/2001 16:35:55
 
 
To
22/08/2001 21:33:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00547729
Message ID:
00548301
Views:
10
Thanks Vlad / Hilmar,

I found a work around though. I adjusted the values in the LotSort column created using the SQL Select. Since the Zip4 is a number (although a character type field) and only 4 characters, for those with a "D" LotOrder I did a 1000-Val(Zip4) or 1000-Val(DP). This lets me do an ascending sort and still come out with the desired result.

"Select *, ' ' As Stream, ;
PadL(IIf(Left(Cart,1) = 'B', IIf(LotOrder = 'D',Transform(1000-Val(Zip4)), Zip4), IIf(LotOrder = 'D',Transform(1000-Val(DP)), DP)), 4, '0') As LotSort From MasterFile

Thanks for all your help guys.

Aloha,

James
Previous
Reply
Map
View

Click here to load this message in the networking platform