Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A question about SELECT SQL?
Message
De
05/10/2000 09:10:41
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00424948
Message ID:
00425246
Vues:
16
>>Put your data in the array in String
>>P.e
>>cString=""
>>For i=1 to alen(cArray)
>> cString=cString+cArray(i)+","
>>endfor
>>cString=Left(len(cString)-1) && supress the las ","
>>cWhere="Inlist("+companyName+","+cString+")"
>>Selec * from my table &cWhere
>
>Juan,
>
>First of all, INLIST function is limited to 24 elements according to DOC.
>
>Secondly, you have to surround each code with quotation, e.g.
>
>
>for i=1 to alen(myArray)
>    cString=cString+'"'+myArray[i]+'",'
>next
>
>
>Anyway, Sergey and Houston already gave the correct and better syntax.
>
>Another idea, similar to Sergey's, but according to my tests should run faster:
>1) Put array into a temprorary table (or cursor) myTempTable (all companies in upper case), index this table by CompanyName
>
>2) select * from MainTable inner join myTempTable on upper(MainTable.CompanyName)=myTempTable.CompanyName
>
>MainTable should have an index on upper(CompanyName)
Hi Nadya and Good Morning...thanks for your reply...it helps....:)
Robert Keith
Independent Developer
San Antonio, Texas
E-mail address:
rebelrob1@yahoo.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform