Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

Number of records processed/inserted in a table (Without A Loop?)

$
0
0

Hi friends,

Although a counter may be used in a loop to show the progress of a query, is there any similar way to apply such a way in case of a non-looping query structure?

I actually have one of the tables with around 3 Million Records, from which most of the time I have tocreate some temporary tables (instead of views). In this case is it possible to show how many of the records (In Tens of Thousands) have been selected and added to the new table while running a query like:

Query Sample:

SELECT TEMPWORK.*

INTO NEWTABLE

FROM

    (SELECT * FROM OLDTABLE_A FULL OUTER JOIN OLDTABLE_B

        ON A1=B1 AND A2=B2 AND A3=B3) AS TEMPWORK

Results Desired:

10000 Records

20000 Records

30000 Records

32132 Records affected


Best Regards, Faraz A Qureshi


Viewing all articles
Browse latest Browse all 8428

Trending Articles