Parsing SQL-Files

Tom Bryan TBryan at UTS.Itron.com
Sun Mar 5 20:19:29 EST 2000


"Dr. Peter Stoehr" wrote:

> I have more than 100.000 lines of SQL code forming a script to create a
> database. Unfortunately, there is no documentation. That's why I'm
> thinking about writing a python based script that parses all the SQL
> statement. 

I did something similar, but it's very limited and special-case.

I had a huge script of "create table" statements but no ER Diagram for 
an Oracle database.  I wrote a script to pull the information about all 
of the tables into Python and to write out (using HTMLgen) a web page 
with all of the tables and columns with many links within the page.

If you want to use it as a starting point for your program, I could 
post it tomorrow.  Let me know if you're interested.

---Tom



More information about the Python-list mailing list