Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nesting too deep
Message
From
30/09/2004 03:54:02
 
 
To
30/09/2004 00:59:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00947404
Message ID:
00947424
Views:
17
>How can I change this query. Foxpro says.. nesting too deep
>
>
>SELECT DISTINCT sfolio FROM folio WHERE sfolio in(select memb_folio FROM demat WHERE qty_accept > 0 AND demat_no NOT in(select trfno FROM wcert))

A generic answer:
SELECT DISTINCT F.sfolio;
FROM demat D;
	LEFT JOIN wcert W ON W.trfno=D.demat_no;
	JOIN folio F ON F.sfolio=D.memb_folio;
WHERE  D.qty_accept > 0 AND W.trfno IS NULL

* or
SELECT DISTINCT D.memb_folio sfolio;
FROM demat D;
	LEFT JOIN wcert W ON W.trfno=D.demat_no;
	JOIN folio F ON F.sfolio=D.memb_folio;
WHERE  D.qty_accept > 0 AND W.trfno IS NULL
Previous
Reply
Map
View

Click here to load this message in the networking platform