Hi all,
I am using SQL 2005. I have a stored procedure that does 13 separate selects into a temp table and then does an full outer join to merge them together. It seems like the server is not waiting for one select/insert to end before it starts the next one as I get data for January, March, and May, but not February, April, etc. I know the data for February is there since I have checked with a select statement to verify. Any help would be greatly appreciated.
Thanks!
Brett
Quick Overview:
Pull Jan records to Temp Table 1.
Pull Feb records to Temp Table 2.
Merge Jan & Feb records to Temp Table 3.
Delete #1 and #2
Copy #3 to #1
Delete #3
Pull Mar records to Temp Table 2.
Merge #1 (Jan/Feb) with #2 (Mar) into #3.
and so on...
...
Return * from #3
I am using SQL 2005. I have a stored procedure that does 13 separate selects into a temp table and then does an full outer join to merge them together. It seems like the server is not waiting for one select/insert to end before it starts the next one as I get data for January, March, and May, but not February, April, etc. I know the data for February is there since I have checked with a select statement to verify. Any help would be greatly appreciated.
Thanks!
Brett
Quick Overview:
Pull Jan records to Temp Table 1.
Pull Feb records to Temp Table 2.
Merge Jan & Feb records to Temp Table 3.
Delete #1 and #2
Copy #3 to #1
Delete #3
Pull Mar records to Temp Table 2.
Merge #1 (Jan/Feb) with #2 (Mar) into #3.
and so on...
...
Return * from #3