I want to parse a complex SQL which has (inner join,outer join) and get the table names used in the SQL.
I am able to get the table names if it is simple select but if the SQL has inner join ,left join like below then the result is giving only the first table.
select * from xyz inner join dhf on df = hfj where z > 100
I am using the program similar what is present in the below link by Paul.
http://pyparsing.wikispaces.com/file/view/select_parser.py/158651233/select_parser.py
Can someone tell me how to get all the tables used in a SQL like below
select * from xyz inner join dhf on df = hfj where z > 100.