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.
Author |
Topic |
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2012-02-02 : 12:36:30
|
How can I solve the parameter being passed to the stored proc please?Note that the sql is being built dynamically inside the stored proc.Thanksexec MyStoredProc @Where=N' field1 IN (''hello'',''you'')'Caution: Changing any part of an object name could break scripts and stored procedures.exec MyStoredProc @Where=N' field1 IN ('hello','you')'Incorrect syntax near 'hello' |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-02 : 12:48:10
|
can you show how you're using @where instead procoedure?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2012-02-03 : 10:49:59
|
Solved by using two single quotes around the stringThanks |
 |
|
imranabbasi
Starting Member
1 Post |
Posted - 2012-02-03 : 11:08:42
|
quote: Originally posted by arkiboys Solved by using two single quotes around the stringThanks
Can you paste the working code here ? |
 |
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2012-02-03 : 16:33:00
|
first exec in my first post |
 |
|
|
|
|