• I think you could have also used

    @execute_query_database = Product_Database

    instead. it would have caused the sp_send_dbmail to change the database before executing the query.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]