Declare @i int =1
while(@i <=100)
begin
print left(newID(),20)
set @i = @i+1
End
Declare @i int =1
while(@i <=100)
begin
print left(newID(),20)
set @i = @i+1
End
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Aug 10, 2015, 1:29 AM
Hi,
Length of GUId is around 36 and In your query you just take left 20 of GUId so it might chance to duplicate.
use full GUID instead of 20 character of GUID...
hope this will help you.
Upendra Pratap ShahiPosted Aug 10, 2015, 1:14 AM
Declare @i int =1
while(@i <=100)
begin
print left(newID(),20)
set @i = @i+1
End