Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I order the result according to inlist type data
Message
From
13/12/2004 05:17:23
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
 
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 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00968680
Message ID:
00968683
Views:
10
This message has been marked as the solution to the initial question of the thread.
Hi Ali,
>select customer_id  ;
>  from Customer ;
> where customer_id in (16, 10, 12, 15, 8, 1) ;
>  into cursor curCustormer
>How can I order the result cursor according to data in the set of inlist expressions
>Thank in advance
>Ali Altun

Try:
select customer_id,  ;
  iif(customer_id = 16, 0, iif(customer_id = 10, 1, iif(customer_id = 12, 2, iif(customer_id = 15, 3, iif(customer_id = 8, 4, 5))))) myNewField ;
  from Customer ;
 where customer_id in (16, 10, 12, 15, 8, 1) ;
  order by myNewField ;
  into cursor curCustormer
I hope this helps you.
Bye!
Erick
Força Sempre!
Strength Always!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform