September 17, 2009 at 9:31 pm
Comments posted to this topic are about the item newid() and newsequentialid()
September 18, 2009 at 10:00 am
At the very least, they are spelled differently. 😎
September 18, 2009 at 12:30 pm
As for newsequentialid() not being able to be referenced directly, here's a kluge I've been using (not my idea, but liked it's simplicity):
-- default to one value returned
create proc get_newsequentialid
@numID int = 1
as
begin
create table #my_seq_id(myID uniqueidentifier default newsequentialid())
declare @cnt int
set @cnt = 0
while @cnt < @numID
begin
insert into #my_seq_id default values
set @cnt = @cnt + 1
end
select * from #my_seq_id
drop table #my_seq_id
end
go
Gaby________________________________________________________________"In theory, theory and practice are the same. In practice, they are not." - Albert Einstein
September 22, 2009 at 1:59 pm
Inasmuch as they both generate GUIDs, they are the same. The question was somewhat ambiguous
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply