Dec 12, 2005 #1 thorny00 Programmer Feb 20, 2003 122 US I would like to create a random 6 character field that contains but numeric and alpha characters. How can this be done? i.e. 2TRE3GFH Thanks!
I would like to create a random 6 character field that contains but numeric and alpha characters. How can this be done? i.e. 2TRE3GFH Thanks!
Dec 12, 2005 #2 SQLDenis Programmer Oct 1, 2005 5,575 US select left(replace(newid(),'-',''),6) Denis The SQL Menace SQL blog:http://sqlservercode.blogspot.com/ Personal Blog:http://otherthingsnow.blogspot.com/ Upvote 0 Downvote
select left(replace(newid(),'-',''),6) Denis The SQL Menace SQL blog:http://sqlservercode.blogspot.com/ Personal Blog:http://otherthingsnow.blogspot.com/
Dec 12, 2005 Thread starter #3 thorny00 Programmer Feb 20, 2003 122 US Thanks Denis. So simple and it's exactly what I need ! Upvote 0 Downvote