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:
00417813
Vues:
15
Use 'IN ()' IN SQL statement, it allows unlimited number of items, like following:
SELECT ... WHERE MyField IN ("value1","Value2",...,"value50")

In the sample below rtrim(b.csemester) is incorrerct. Do not use rtrim function in that case. Just assure length of csemester field match to length of sem_Names field.


>you right , INLIST only let you have 24 items in the List. Any way I already have tryied the cursor, but it does not seems to work.
>can you take a look at this and tell me,Am I doing anything wrong?
>
>this is what i did:
>
>CREATE CURSOR SQL_Sem (sem_Names C(25))
>
>for i = 1 to thisform.selectedlist.listcount
> INSERT INTO SQL_Sem (sem_Names);
> VALUES (thisform.selectedlist.ListItem(i))
>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 rtrim(b.csemester) in (select sem_Names from SQL_Sem) into dbf c:\attend\temp
>
>when I brows the temp table, it is empty.
>
>thank you again:)
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform