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:
01217744
Vues:
6
  • There's no STRTRAN() function in SQL Server
  • The " (double quote) can only be used as string literal delimiter when SET QUOTED_IDENTIFIER OFF, which is not default setting
  • When string literal is encloused in double quotes, thre's no reason to double single quotes

    >Try ..
    >
    >DECLARE @L_SQLCOMM VARCHAR(8000)
    >
    >SET @L_SQLCOMM = strtran("SELECT * FROM AMASTER where ACCTNAME = (ala'a)","'","''")
    >
    >EXEC(@L_SQLCOMM)
    --sb--
  • Précédent
    Répondre
    Fil
    Voir

    Click here to load this message in the networking platform