Maybe it just doesn't like the # character in the table name. -Will
> -----Original Message----- > From: Anantharaman Sekaripuram, Gopalakrishnan > [mailto:gopalakrishnan.sekaripuram.ananthara...@deshaw.com] > Sent: 4 August 2011 08:57 > To: dbi-users@perl.org > Subject: perl-dbi #temp table created using handle not accessible when > accessed via ->do() with the same handle > > Hi DBI-users, > > I am facing this problem perl DBD::ODBC rollback ineffective with > AutoCommit enabled at<http://stackoverflow.com/questions/6938036/perl- > dbdodbc-rollback-ineffective-with-autocommit-enabled-at> and while > looking at the problem , I found that a very basic thing is failing > with Perl::DBI using DBD::ODBC on sql server. But i am not sure if this > wont happen with any other driver. > The problem is that when I create a #temp table using $dbh->do and when > i try to access the same #temp table using another $dbh->do, i am > getting the below error. Also this does not happen all the time, but > only intermittently. > Invalid object name '#temp' > $dbh->do("SELECT ... INTO #temp FROM ..."); > $dbh->do("INSERT INTO ... SELECT ... FROM #temp"); > > The second do fails with 'Invalid object name '#temp'' > -Gopal > >