Reputation: 85
So this is probably a stupid question and I've tried finding it within other find/replace posts but they didn't work/fit my problem.
I have a field in my table that randomly has a " at the beggining of the line and I wanted to know how I could find and remove these quotes.
Thanks!
Upvotes: 0
Views: 44
Reputation: 65547
If you just want to remove the quote if it's the first character of the string then you can do something like this:
update your_table
set your_column = substr(your_column,2)
where left(your_column,1) = '"'
Upvotes: 0
Reputation: 598
I'm just guessing, but can you update your table, and set the column value to its same value without the strings?
UPDATE TABLE
SET COLUMN = REPLACE(COLUMN_NAME, '"', '');
Upvotes: 3
Reputation: 175796
How about
UPDATE tbl SET fld = SUBSTR(fld, 2) WHERE fld LIKE '"%';
Upvotes: 0