>Jim,
>
>PMFJI, Sql Server allows to use result set returned by one query (called derived table) as a source of another. You could redisign your sequence of 3-8 queries into one using derived tables and joins. Even using sproc's you should do that to make queries more effficient.
I understand that SQL Server allows that, but what I'm missing (I think) is... from one SELECT to the next, how does SQL Server know to keep the prior results around for later use IF I have sent the SELECTs each independently to it (as looks like would be the case with my present code)?
I believe that I can do this in a SP (reun them all as a single unit) but want to learn if it's possible without SPs.
Thanks
>
><snip>
>>Regarding your last point, do you mean to send all (3-8) SQLs in a single SQLExec? I understand that something like that can be done and that results sets for each are returned. IF that's close to correct < s >, and I really only need the last one, is that possible?
>>
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement