Just wondering if any experts can help shed light on this, trying to get a multiple query count.
I'm wanting to run x amount of (pretty) complex queries in query analyser (mssql), and to get an overall count of returned rows of all 5 queries, if that makes sense.
Eg declare each query as a variable, then select the count from each variable in columns (named appropriately)?
I'll try and be a bit more clear....
declare @Variable varchar
set @Variable = (multiline join query here)
say 5 times each using a different query naturally, and I want to get a total count for each query, in a sort of table such as:
Query1
100
Query2
500
Query3
100000000
I'm wanting to run x amount of (pretty) complex queries in query analyser (mssql), and to get an overall count of returned rows of all 5 queries, if that makes sense.
Eg declare each query as a variable, then select the count from each variable in columns (named appropriately)?
I'll try and be a bit more clear....
declare @Variable varchar
set @Variable = (multiline join query here)
say 5 times each using a different query naturally, and I want to get a total count for each query, in a sort of table such as:
Query1
100
Query2
500
Query3
100000000
Last edited: