Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
It's a series of SQL SELECTs with no intermediate processing.
It roughly goes as follows:
- SELECT a subset of records with specific characteristics (has a UNION)
- SELECT some records INNER JOINed on first above
- 4 UNIONed SELECTs to get additional records of interest also INNER JOINed on first above
- FULL JOIN of last 2 above, producing result set of interest. All other results ignored.
It just seems to me that I should be able to do this using SPT, returning the single final cursor of interest.
>Jim,
>
>If your earlier selects all do insert into #tables there won't be any result to come back. You can create a temporary SP, call it and drop it. But overall the best thing to do is write a bonafide SP that SQL can create a decent query plan for and call it.
>
>>But I think there's gotta be a way directly, as opposed to a SP.
>>
>>Do you think SP is the only way?
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