Re: HELP parsing select statement ?
Posted in 1993
scottd@amgen.com (Scott Deifik) writes: : Does anyone have any code to determine what tables and fields are being : returned in a select statement. : : Ie. select field1, field2 from table1, table2. : : Has anyone written anything that will read in the select statement : and spit out the fact that field1 is in table2 and field2 is in table1? : : I know that the field name is stored in the sqlda structure, but I can't : find where the table name is stored. I assume that the code would have : to check the syscolumns and systables tables. : Yes, systables and syscolumns are the places you want to look. What you want to do would be easily possible using isqlperl but no I havn't written such a thing. You can get isqlperl (a set of extensions for perl) from ftp.demon.co.uk:/pub/perl/db/isqlperl and, of course, you need to get perl from the usual archives. Regards Neil -- Neil S. Briscoe Telephone: +44 252 376737 System Administrator Fax: +44 252 376644 Email: neil@salmon.demon.co.uk nbriscoe@cix.compulink.co.uk