Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
2 level SQL
Message
 
 
To
15/05/2008 18:40:54
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01317489
Message ID:
01317491
Views:
11
>For you SQL gurus out there, is there a way this sequence could be combined into one command?
>
>
>select dist personid from list_members where list_id>67 into cursor crsTemp
>
>select maillist.* ;
>from maillist ;
>inner join crsTemp ;
>on crsTemp.personid = maillist.personid ;
>order by company
>
>
Yes, use derived tables:
select maillist.* ;
from maillist ;
inner join 
(select dist personid from list_members where list_id>67) crsTemp ;
on crsTemp.personid = maillist.personid ;
order by company
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform