Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxPro - no subqueries?
Message
 
À
15/07/1998 13:11:59
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00117676
Message ID:
00117696
Vues:
116
>>>>I was trying to do a query like in the Visual FoxPro help file but got the "SQL - Subquery is invalid".
>>>>
>>>>code: select journal.summaryid from journal where journal.summaryid in (select main.summaryid, main.submitter from main where keywords like "%11B%")
>>>>
>>>>Thanks.
>>>Subquery should select one field here:
>>>select journal.summaryid from journal ;
>>>      where journal.summaryid in ;
>>>      (select main.summaryid from main where keywords like "%11B%")
Cetin
>>Thanks. That is working. Now, how can I get other information our from both the Journal and Main tables?
>Aha, that's slightly different.
select * from journal ;
>  inner join main ;
>  on journal.summaryid = main.summaryid
>* Or works in older versions too
>select * from journal, main ;
>  where journal.summaryid = main.summaryid
Cetin

Thanks again! My difficulty was put in the last condition. Ahhh.. Finally I got ti straighten out as follows:

select journal.*, main.summaryid, main.submitter from journal, main where journal.summaryid=main.summaryid and journal.summaryid in (select summaryid from main where keywords like '%11B%')

I'll try "inner join" later to see if the line is shoter. I do need the submitter field from MAIN.DBF and all the fields in the JOURNAL.DBF to show a search result.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform