please help!
I'm new to Linux and I'm looking for a regex (sed) or other simple way to format the SQL like
Code:
select ABREV from LIMITS, ABREV where ABREV='US'
into
Code:
select ABREV from SCHEMA.LIMITS, SCHMEA.ABREV where ABREV='US'
I've tried
Code:
sed 's/\(select.*from[ ]*\)\([A-Za-z0-9_]\)\(.*\)/\1SCHEMA.\2\3/'
but it produces only
Code:
select ABREV from SCHEMA.LIMITS, ABREV where ABREV='US'
any help please?
P.S. There may be any number of table names