Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

removing leading and trailing characters

User_IC3C9Apr 7 2020 — edited Apr 7 2020

with t as

(select ',,,ASS' as c1 from dual union all

select 'DOG,,,' from dual union all

select ',,CAT,,' from dual union all

select ',,B,GH,J,,K,,' from dual union all

select '",",CA,T","'  from dual)

select trim(both ',' from c1) from t

Above query returning the double quote

ASS

DOG

CAT

B,GH,J,,K

",",CA,T","

Need to remove leading and trailing double quote and comma.

Please help me with a common function to remove them

This post has been answered by mathguy on Apr 7 2020
Jump to Answer
Comments
Post Details
Added on Apr 7 2020
2 comments
712 views