![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Howdy, First of all thanks in advance, I'm runnig SQL 2000 from my desktop I've created a table that I use for reporting purposes sysfact_temp. This table is created via a series of SQL statements. Once created, there are around 15000 rows and 20 fields. The second ].[dbo].[CXMSShip_Fact View] has aprox 30000 rows I have tried to run this query as a task in a DTS package and I noticed that it takes hours to perform the step with the query posted below. Also I've tried to write the query in different ways but still take too long to run. Apparently it goes row by row trying to find a match..... Any help on how to improve the performance of this query would be greatly appreciated Thanks in advacance Joe. UPDATE Sysfact_temp SET Total_Qty = (SELECT SUM( a.TRQty ) FROM [CS_Analysis].[dbo].[CXMSShip_Fact View] AS a WHERE a.Rack = Sysfact_temp.salesorder and SysFact_temp.complete_count = '1' Group by a.Rack) |
![]() |
| Thread Tools | |
| Display Modes | |
| |