Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    46

    Unanswered: Replace Apostrophies??

    Hi All,

    I have trigger that sends data from one table to another. I need to make sure that if the data that needs to be sent across has an apostrophe, that it is replaced by two apostrophies so it adheres to the SQL syntax and that it doesn't error.

    Is it possible to use the REPLACE function for this or is there some other way to get around this??
    Can I write REPLACE(@VARIABLE, ''', '''') for this or won't this work??

    If someone can give me anysight into this and any code on how to do this would be great.

    Thanks
    Anthony

  2. #2
    Join Date
    Dec 2002
    Location
    Czech Republic
    Posts
    249
    REPLACE(@VARIABLE, '''', '''''')

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •