• sp_execute needs the statement to be unicode, so change @DB to NVARCHAR...



    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]