Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql statement with multiple single quotations
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01217632
Message ID:
01217741
Vues:
6
>>Hi,
>>
>>Thanks you for quick answer but we still the same problem special with names like the following exmple:
>>
>>DECLARE @L_SQLCOMM VARCHAR(8000)
>>
>>SET @L_SQLCOMM = 'SELECT * FROM AMASTER where ACCTNAME = (ala'a)'
>>
>>EXEC(@L_SQLCOMM
>>
>>"ala'a " is Arabic name in English characters.
>>
>>Regards
>
>Try ..
>
>DECLARE @L_SQLCOMM VARCHAR(8000)
>
>SET @L_SQLCOMM = strtran("SELECT * FROM AMASTER where ACCTNAME = (ala'a)","'","''")
>
>EXEC(@L_SQLCOMM)

William,
There is no STRTRAN() function in T-SQL :-)
It has REPLACE() one.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform