Viewing 15 posts - 31 through 45 (of 66 total)
Thanks for the tip Grasshopper, messing with SET IDENTITY_INSERT is yet even faster
September 19, 2007 at 3:02 pm
Do you mean insert the ids into the new table directly from the old table? If so, this won't work because those ids are used already.
Or do you mean...
September 19, 2007 at 12:59 pm
Well I got it down to just over 2 minutes by inserting a column into the new table to store the old id, then using that after the bulk insert...
September 19, 2007 at 12:13 pm
In some cases multiple records have duplicate data (even timestamp) so I couldn't figure out how to match the new inserted recs back to the old table.
I will put some...
September 19, 2007 at 11:47 am
Thanks to all for input, especially Daryl for a solution that works
July 10, 2007 at 5:13 pm
Using the text comparison seemed to work fine, thanks!
July 10, 2007 at 2:24 pm
Adding the alias fixed the previous error, but now I get this error:
"Conversion failed when converting the varchar value 'ALL' to data type int."
But hosp_id = 'ALL' was properly filtered...
July 9, 2007 at 2:32 pm
It looks like Ian's solution should work for my data, but why am I getting a syntax error? Incorrect syntax near ')'
select count(Wt_Id) as Weight_Unit
from (select Wt_Id, Hosp_id...
July 9, 2007 at 11:55 am
Looks promising, thanks! ... will do more testing...
May 30, 2007 at 10:12 am
I am guessing that dropping the trigger on production will not be an option but I'll have to see what my mgr says.
I did verify that the whole mess works...
May 9, 2007 at 12:56 pm
Oh duh, that solves part of the mystery. But ugh, i really don't think we want to mess with the triggers since who knows what side effects that may...
May 9, 2007 at 12:35 pm
I haven't used profiler before but no time like the present, i'll figure it out.
Interestingly, I can update the UpdatedBy values by issuing single UPDATE stmts, and when...
May 9, 2007 at 11:29 am
Also, I wrote the code to determine the next AgeId before I realized that there was a trigger that would do it. So my SQL to insert can be...
May 9, 2007 at 11:03 am
Hmmm, weird. I am going to go back and try to figure out why i can't update the UpdatedBy column. This db was created by consultants who are...
May 9, 2007 at 10:58 am
Here is my SQL to do the insert-
DECLARE @maxNum int
DECLARE @increment smallint
DECLARE @IdsAgeUnit table (idOld int, idNew int)
SELECT@maxNum = max_num, @increment = increment
FROM StefHpl_prod.hpl.Table_List WHERE Table_Name = 'Age_Unit'
INSERT...
May 9, 2007 at 10:22 am
Viewing 15 posts - 31 through 45 (of 66 total)