Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Some help with a sub-query
Message
De
27/03/2002 06:21:47
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00637702
Message ID:
00637716
Vues:
14
>Hi all,
>
>I'm new to sub-queries and I was wondering if it was possible to combine the following into one select statement using a sub-query.
>
>
>Select * ;
>FROM Links;
>WHERE Links.itype in (1,0);
>GROUP BY links.iwork;
>INTO CURSOR Linked
>
>SELECT Exhibit.iid, Exhibit.nkey, linked.*;
>FROM Exhibit LEFT OUTER JOIN Linked ON Exhibit.iid =Linked.iwork
>
>
>Any help would be greatly appreciated.

Caroline,

Does this approach what you're after ?
select	Exhibit.iid, ;
	Exhibit.nkey, ;
	L1.* ;
    from Exhibit, Links L1 ;
    where    ( Exhibit.iid ;
		in	( select Distinct L2.iwork ;
				from Links L2 ;
 			   where    ( L2.itype in (0,1) ) ; 
			) ;
		) ;
	   and	( Exhibit.iid == L1.iWork )
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform