• I would think you could use a windowing function to accomplish this, but without table structures and sample data I'm not sure. Is there a reason the following wouldn't work?

    select 'Company' + cast(row_number() over (order by getdate()) as varchar(5))



    Microsoft Certified Master - SQL Server 2008
    Follow me on twitter: @keith_tate

    Forum Etiquette: How to post data/code on a forum to get the best help[/url]