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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 9, 2015, 9:14 PM EDT
Declare @i int =1
while(@i <=100)
begin
print left(newID(),20)
set @i = @i+1
End
Jignesh TrivediRank #16 · 50.3K reputationPosted Aug 9, 2015, 9:29 PM EDT
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.