No thats the total run time for the script....
it takes roughly 8 - 9 secs for it to get to your routine while it builds up to the final temp table and your routine is 1 sec or less
Your quite right George I am trying to do a complicated sorting query using temp tables and I am using an idcol so all the row numbers will be consecutive and your second example runs in under 10 secs in my total query....
The machine is a 4 core Xeon with 2GB ram running W2K and SQL2K
Thats a lot faster gmmastros .. Thanks for pointing me in the right direction with that
and Monksnake I too have seen that cursors are a bad thing and your more of an expert than me but I'm learning all the time....
Thanks you guys
Cheers for that
Gave it a go and it works but very slow
Tried it on 4200 rows and cancelled after 20 mins
tried it on the first 1000 rows and again cancelled after 20 mins
100 rows = 45 secs
200 rows = 89 secs
300 rows = 208 secs
would a cursor routine be quicker and if so any tips on...
I have been trying to setup a running date difference (DAY) query for this table that resets on StockCode Change but with little luck as I have been trying to modify a running sum one I use...
Can anyone help
SELECT RowNum, StockCode, ReqDate
FROM temp6
Data example
47 E0038...
I need to setup something to synch a master folder to all clients..
We have an accounts package that uses Crystal Reports and for some stupid reason the Invoice, credit etc.. templates need to be on the local computer and cannot be shared from a central point. Currently when I make a change to a...
I am trying to group some quantities together but I keep getting stuck on the last stage....
SELECT SM_STOCK_CODE, sm_type, YEAR(SM_DATE)AS smyear,
CASE WHEN sm_type = 'P' THEN SUM(CASE WHEN sm_status = 'O' THEN 0 - sm_quantity ELSE sm_quantity END)ELSE 0 END AS Bought,
CASE WHEN...
Starting from scratch on this one.
Our production team use a spreadsheet to manipulate data pulled into it from our SQL Server and they then want to send the updated data back to the SQL Server.
Luckily for me it is just the Production Date they want to update.
All they need from the...
ref thread958-1119077
I have one machine that throws up this error when trying to access an adp over the network, googled and found nothing an anyone help
Cheers for that....
You learn something new every day :-)
Figured the select statement out but now my prequery thing is bugging me..
I need to generate DT092006 but I return DT92006
here's my test code
declare @mnth int, @yr int, @curmnth int, @curyr int
set @curmnth = month(GETDATE())...
Before we start this is not my database....
We have a Time and Attendance System that stores all the clockings in seperate tables depending on the year and month i.e.
DT102006 = Oct 2006
DT112006 = Nov 2006
What I am trying to achieve is to extract out of the tables certain information and...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.