user2755209
user2755209

Reputation: 85

Find and remove quotes within table

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

Answers (3)

Ike Walker
Ike Walker

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

Brent
Brent

Reputation: 598

I'm just guessing, but can you update your table, and set the column value to its same value without the strings?

String Replace

UPDATE TABLE
SET COLUMN = REPLACE(COLUMN_NAME, '"', '');

Upvotes: 3

Alex K.
Alex K.

Reputation: 175796

How about

UPDATE tbl SET fld = SUBSTR(fld, 2) WHERE fld LIKE '"%'; 

Upvotes: 0

Related Questions