Viewing 4 posts - 1 through 4 (of 4 total)
Ians, I believe you can use it for production.
The last value assigned to @LastKey is the largest NameKey in the set because the update query definitely uses the index [LargeTable__IE1].
May 21, 2007 at 2:09 am
I think this could do the job...
set nocount on
SET ROWCOUNT 1000
declare @rowcount int, @batchcount int, @rowsupdated int
declare @LastKey nvarchar(341)
select @rowcount = 1,@batchcount = 0, @rowsupdated = 0, @LastKey =...
May 20, 2007 at 11:16 pm
Thank you Jeff, I was too sleepy to run comparison tests myself last night.
Your input length condition is a nice touch.
But no Jeff, it not a cross-join nor generates 65,536...
May 19, 2007 at 1:53 pm
How about this? No dynamic SQL, no (explicit) loop. Just a permanent lookup table.
====================================================================
declare @dec2hex1 table (
id smallint identity(0,1),
hex1 char(1)
)
insert into @dec2hex1 (hex1)
select top 16 null from sysobjects
update @dec2hex1
...
May 19, 2007 at 3:53 am
Viewing 4 posts - 1 through 4 (of 4 total)