Stored Proc and Master DB

  • I don't know how are you using the parameter

    but this sholud helpyou going

     
    
    Declare @str varchar(200)
    SET @str = DB_NAME()--Assuming is going to be runned from other databases only
    --otherwise use dbname as a parameter

    +'.dbo.sp_helprolemember '
    + ''''
    + 'RoleName'
    + ''''
    --print @str
    exec (@str)

    I don't know why can't the "plus" sign show


    * Noel

  • Thanks very much mate. The 'DB_Name()' is going to be helpful for me on this. I shall have a go at it.

    Thanks

Viewing 2 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply