Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why does this not work in sproc but in query analyzer ??
Message
 
 
À
22/01/2003 13:21:05
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00744286
Message ID:
00744399
Vues:
9
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform