• Luis Cazares (8/25/2016)


    Alvin Ramard (8/25/2016)


    Would this work?

    LEFT(REPLACE(CAST(NEWID () AS NVARCHAR(MAX)), '-', '') , 15)

    I'm not sure if that will return unique strings. Although, the chance for duplicates is low.

    Good point Luis. A Unique constraint could easily prevent duplicates.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]