Quotations

  • I have written a stored procedure that updates data, it runs ok until it reaches the name Milly's.

    I know the problem is with the quotation but I am not sure how to correct it.

    the fields are ORG= '''+@FIELD1+''',

    Field 1 equals Milly's

  • Surely this is a T-SQL question, not SSIS?

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • Best answer, dont use dynamic SQL.

    Doing a quote twice will imply to sqlserver that you need the value of quote.

    Consider this statement

    select ''''

    You will have to modify the value held in the value , replace is probably the best option.



    Clear Sky SQL
    My Blog[/url]

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

You must be logged in to reply to this topic. Login to reply