Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)

  • RE: Single Quotation Marks in SQL

    Yep and the returned string includes single quotes so no need to include additional quotes before tbe plus sign

  • RE: Single Quotation Marks in SQL

    you can use quotename to make the input string a valid SQL Server delimited identifier.

    DECLARE @quotedvar nvarchar(100)

    DECLARE @sql nvarchar(1000)

    SET @quotedvar = 'O''Neil'

    SET @sql = 'PRINT ' + quotename(@quotedvar,'''') +...

Viewing 2 posts - 1 through 2 (of 2 total)