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 2000 Forums
 SQL Server Development (2000)
 Weird parameter passing

Author  Topic 

srad
Starting Member

39 Posts

Posted - 2001-08-16 : 07:01:57
I have written an sp (sp1)that receives a varchar as an input parameter and executes another sp (sp2)passing that parameter. When i exec sp1 i have to pass the input parameter in parenthesis otherwise i get the following error...

Server: Msg 207, Level 16, State 3, Line 3
Invalid Column Name AB1234567CD

Nothing too unusual about this but because sp2 also receives this parameter as a varchar i expected to have to enclose the input parameter in parenthesis i.e.
char(39) + AB1234567CD + char(39) within sp1's code. But SQL treats this as ''AB1234567CD'' and returns incorrect results.

Any Ideas??

   

- Advertisement -