Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 exec sp with a parameter

Author  Topic 

Micha2300
Starting Member

1 Post

Posted - 2009-08-20 : 14:47:47
hi guys!
I'm trying to exec sp from db engine query and passing a varchar paramtere -
exec mysp("Myname")
It doesn't work out
why?
thanx

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2009-08-20 : 14:53:33
exec mysp 'Myname'

EDIT:
strings should be single quoted
SP parameter values should not be enclosed in parenthises

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -