• Here is an excellent read on the subject:

    http://msdn.microsoft.com/en-us/library/aa259228(v=sql.80).aspx

    Scroll down a little more than half the page to see examples.

    Here is a quick example:

    SET QUOTED_IDENTIFIER OFF

    DECLARE @Toff VARCHAR(100)

    SET @Toff = 'I''ve got a lovely bunch of cocnuts'

    SELECT @Toff

    Result:

    I've got a lovely bunch of cocnuts

    edited to take result out of code block

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]