Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sql statement with multiple single quotations
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01217632
Message ID:
01217744
Views:
7
  • 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--
  • Previous
    Reply
    Map
    View

    Click here to load this message in the networking platform