Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why does this not work in sproc but in query analyzer ??
Message
 
 
To
22/01/2003 13:21:05
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00744286
Message ID:
00744399
Views:
8
You're welcome.

>I unfortunately do have to build the string, but I did not know I could use a double single quote. That will make life a whole lot easier for me.
>
>Thanks for your help, you saved the day !!!
>Jace
>
>>Jace,
>>
>>SET QUOTED_IDENTIFIER is ignored inside sproc because it's processed at parse time. You can achive your goal w/o changing this setting. First, you don't have to use dynamic SQL in this case. The following will work
SELECT lbl_text FROM MetaLabel WHERE lbl_frm_id = @pFrm_id
Second, If it just an example and you have to build dynamic SQL, than you can double single quote inside the string to represent single quote.
SET @tsql1 = 'SELECT lbl_text FROM MetaLabel
>>  WHERE lbl_frm_id = ' + '''' + @pFrm_id + ''''
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform