
September 28th, 2003, 01:49 PM
|
|
Junior Member
|
|
Join Date: Sep 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Formatting using AWK, SED, PERL
Hey,
I have a SQL statement as follows :
select tab1.col1, tab2,col2,tab3.col3 from scott.emp where tab1.col1 = tab2.col2 and tab2.col2 = tab3.col3
I need this statement to be formatted as follows :
select
tab1.col1,
tab2,col2,
tab3.col3
from
scott.emp
where
tab1.col1 = tab2.col2
and
tab2.col2 = tab3.col3 ;
1) Tabs inserted for all columns and all keyword like select,from...
2) New Lines after all columns
3) A terminating semi-colon at the end of the etc etc...
Which would be the easy route ? AWK, SED or PERL ?
Thanx in advance !
-Mike
|