Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SPT - multiple SELECTs with single result set
Message
 
To
07/07/2006 09:58:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01134421
Message ID:
01134424
Views:
16
>I want to send a multiple SELECT to SQL Server that creates intermediate result sets to be used in later SELECTs and I want to return only the final result set for use in my program.
>
>I suspect there's a way to accomplish this, but have been unable to open the SQL Server books to get more information. It's installed (books) but I can't find how to open it.
>
>Can someone provide the hints needed to accomplish this?
>
>Thanks

You could SELECT from a derived table, something like:
   SELECT .....
       FROM (SELECT Fld, Fld2
                    FROM MyTable
                    INNER JOIN (SELECT .....) Tbl1 ON MyTable.Fld1 = Tbl1.Fld2) Tbl2
       WHERE ....
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform