I have a sql file and i need to extract the table names used in the sql file using a unix script. If i can extract the lines between the keywords 'FROM' and 'WHERE' in the file, my job is done. can somebody tell me how to do this using a shell script. If u can just let me know, how to extract the lines between 2 strings, it would be a great help.
just to indicate with an example , suppose the file contains :
select e.empno, e.deptno,d.deptname
from emp e, dept d where
from the above i would want to extract the strings present between FROM and WHERE using a script/unix command, so that i should effectively get "emp e,dept d "
Thanks in advance.
Pinned topic extracting the lines between 2 strings of a file
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2007-02-14T20:01:29Z at 2007-02-14T20:01:29Z by rayhiggs