G
Guest
I have a function that replaces all my single quotes going into the DB with two single quotes. So "O'Hare" becomes "O''Hare".
I have a dynamic sql statement for searching for customers. When they type in "O'Hare" I do the same command and turn it into "O''Hare" and use that in the where clause. The problem is it never returns any records. I have to change it to "O''''Hare" (or put 4 single quotes for each single quote that was originally specified) and then it returns the record. Is this the correct way to do this or is there something I'm missing?
I have a dynamic sql statement for searching for customers. When they type in "O'Hare" I do the same command and turn it into "O''Hare" and use that in the where clause. The problem is it never returns any records. I have to change it to "O''''Hare" (or put 4 single quotes for each single quote that was originally specified) and then it returns the record. Is this the correct way to do this or is there something I'm missing?