Hi,
I have a file in which I have database information along with 1 SELECT statement. Only 1 statement would be there. I want to grep this SELECT STATEMENT only and write into a separate file.
Input File format:
Database_Name:<database>
Schema_Name:<schema>
Table_Name:<table>
Select * from <schema>.<table>
I have 2 ways, either I can use the 2nd and 3rd line to create the SELECT statament and write into a separate file:
Select * from <i'll extract schema name (2nd line) and table name (3rd line)>
or
I can grep SELECT statement mentioned in the 4th line and write into a separate file.
--------------------------------------------------------------------------
Other info:
Database is DB2
Let me know if more details are required.
Regards....