Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Consuming the rows of a called SP inside another SP
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01171249
Message ID:
01171258
Vues:
7
>Borislav,
>
>I'm trying to avoid 1) replicating the really complex query in two places (either SP_1Count and SP_1, or twice inside SP_1, 2) the work involved with a creating a #temp table with the structure of the complex query, 3) the wasted throughput sending the large first result set to the web server when only the count is wanted.
>
>>How about in first SP:
>>
>>DECLARE @MyRowCount int
>>SELECT @MyRowCount = SELECT COUNT(*) --- a really complex query
>>RETURN @MyRowCount
>>
>>Seraching for better method ...

O, I see, you need both S Ps but sometimes you need only @@ROWCOUNT from S P 1, and you don't want to use Table variables. I'm thinking, I'm thinking... :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform