Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using INLIST with select statement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00417794
Message ID:
00417802
Vues:
22
>I am trying to do a select statement using this INLIST(), It doesn't seems to work.
>
>for i = 1 to thisform.selectedlist.listcount
> if i < 2 then
> SQL_String = alltrim(thisform.selectedlist.ListItem(i))
> else
> SQL_String = SQL_String + "," + alltrim(thisform.selectedlist.ListItem(i))
> endif
>endfor
>
>select all a.cid, a.cname, b.csemester, b.ccourse, b.ccouroff, b.cstudent from sys_mast a, enroll b where a.cid = b.cstudent and INLIST(rtrim(b.csemester), SQL_String) into dbf c:\attend\temp
>
>when I brows the temp table it is empty.
>
>thank you for any help.
>
Do you get any result without the INLIST clause, that is, are you getting results on a.cid = b.cstudent? Be careful with character comparisons - if you're using character keys, == might be more appropriate.

Is there any issue with case - lower vs. upper?
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform