>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.