USE inside a stored proc

  • How can i use the USE inside a stored proc.

    i want to change the dbname using the use command inside a sp.how can do that

    exec 'USE'+@dbnname()

    is not working can anyone help me...

  • You should be able to use

    @DBName + '.dbo.Table'

    Crispin

    Why don't you try practicing random acts of intelligence and senseless acts of self-control?

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

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

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