Parsing SQL-Files

Dr. Peter Stoehr peter.stoehr at weihenstephan.org
Fri Mar 3 16:21:04 EST 2000


Hi out there in the PYthon-Universe,

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. Mainly I want to know which SQL tables are touched/created
during the process of building the database. For example, if there is
statement like
insert into table_1
     (param_1, ..., param_n)
    select 
     (value_1, ..., value_n)
    from table_2
    where condition_1
          condition_2
	  ...

I'd like to know what s table_1, table_2 and how the conditions look
like.

Maybe someone out there had to perform a similar task and can give me a
hint.

Thanks in advance
    Peter
-- 
---------------------------------------------------------------------------
   Dr. Peter Stoehr --- Teisenbergweg 6 --- 85435 Erding --- 08122/47232
      http://www.weihenstephan.org/home/ak/support/team/jpg/peter.jpg
---------------------------------------------------------------------------
		I'm the terror that flaps through the night



More information about the Python-list mailing list