Skip to Main Content

Data Science & Machine Learning

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!

Need SQL help -

S567Dec 2 2020

Hi Team,
I am using Oracle 11g.
I have a column in a table where string values are stored as SELECT stmnt-
I have a requirement to extract only the table names used in the select statements ( including schema tabes too) basically to pull out the string between FROM and WHERE.

with tbl as (
select 'select * from cc where customer_id in (123)' from dual union all
select 'select * from mbs.email_address where customer_id in (123)' from dual union all
select 'select * from kreddy.transactions where customer_id in (123)' from dual
)

This post has been answered by user10378862 on Apr 28 2021
Jump to Answer
Comments
Post Details
Added on Dec 2 2020
2 comments
96 views