To answer you question, for an Oracle environment I would like $sth->{TABLENAME} to contain a list.
my $tablename = $sth->{TABLENAME} ->[0] = First table $tablename $sth->{TABLENAME} ->[1] = Second table The $tablename value will be schema.tablename format. For example: schema.narf schema.zord Joseph Lamb ----- Forwarded Message ---- From: Alexander Foken <[EMAIL PROTECTED]> To: Lamb Joseph <[EMAIL PROTECTED]> Cc: dbi-users@perl.org Sent: Wednesday, May 7, 2008 11:18:53 AM Subject: Re: How to Retrieve Table Name from Statement Handle Hmmm, and what do you think $sth->{TABLENAME} should contain after executing the following SQL? SELECT t1.foo,t2.bar FROM narf t1, zord t2 WHERE t1.ikes=t2.blurb Alexander On 07.05.2008 19:51, Lamb Joseph wrote: > I am creating a simple tool that will query one table and retrieve the data. > Then this tool will turn the data into insert statements. > > I was wondering if there was a way to retrieve the table name from the > statement handle? > > Similar to print "SQL statement contains $sth->{NUM_OF_FIELDS} columns\n"; > > but like this > > print "SQL statement table name is $sth->{TABLENAME} \n"; > > > Joseph Lamb > > > > > ____________________________________________________________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > -- Alexander Foken mailto:[EMAIL PROTECTED] http://www.foken.de/alexander/ ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ