I am trying to generate 36 length random number that doest have 0, 1 or 6 number in it. What I did is something like that
declare @random char(36)
set @random = newid()
set @random = replace(replace(replace(@random,'6','2'),'1','2'),'0','2')
select @random
I converted 6,1,0 to 2 but probably this isnt the best way to do that in sql server. What is the proper way to solve this problem ?
I found the answer.
http://www.brettb.com/SQL_Help_Random_Strings.asp