Forum Moderators: open

Message Too Old, No Replies

special chars that need escaping

         

sssweb

6:27 pm on Dec 23, 2006 (gmt 0)

10+ Year Member



Can someone give me a link (or list) of characters in SQL statements that need escaping?

I've tried using the following to replace certain strings and am getting no affected rows, even though I know the strings exist. The only thing I can think of is that some chars need escaping:

UPDATE text_table SET text_string = REPLACE (text_string, '=D>', '=D)');
UPDATE text_table SET text_string = REPLACE (text_string, '[-o<', '[-o{');
UPDATE text_table SET text_string = REPLACE (text_string, '<<(:', '{{(:');
UPDATE text_table SET text_string = REPLACE (text_string, ':>((:', ':}((:');
UPDATE text_table SET text_string = REPLACE (text_string, ':>:-)', ':}:-)');
UPDATE text_table SET text_string = REPLACE (text_string, '>:->', '}:-}');
UPDATE text_table SET text_string = REPLACE (text_string, '::-<<:', '::-{{:');
UPDATE text_table SET text_string = REPLACE (text_string, '>:-(', '}:-(');

sssweb

6:36 pm on Dec 23, 2006 (gmt 0)

10+ Year Member



Never mind -- I just discovered that my DB has the HTML entities for < & > (i.e. need to search for &gt; not > )

Will post if any further problems.