Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I order the result according to inlist type data
Message
De
13/12/2004 05:15:23
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
00968680
Message ID:
00968682
Vues:
10
This message has been marked as a message which has helped to the initial question of the thread.
You can't, AFAIK. Your best solution is to do separate selects for each variable, something like this code, not tested:
Do SelectAccInlist with 16,10,12,15,8,1

Procedure SelectAccInlist
LPARAMETER ln1,ln2,ln3,ln4,ln5,ln6,ln7,ln8,ln9 && make sure the number is big enough
LOCAL lnMax,lnCust
select customer_id from Customer where .F. into cursor curCustormer && Create empty cursor
lnMax=PCOUNT()
for X=1 to lnMax
  lnCust=EVAL('LN'+LTRIM(STR(X,2,0)))
  select customer_id from Customer where customer_id=lnCust into cursor curTemp
  select curCustomer
  append from dbf('curTemp')
endfor
endproc
> from Customer ;
> where customer_id in (16, 10, 12, 15, 8, 1) ;
> into cursor curCustormer

>
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform