Perl Database

S

SRam

I am using Perl DBI & Informix...I wrote a query to create a temporary
table in Informix database..I wrote a query to create a temporary
table from already created temp table..It didn't work...In Informix
temp tables would be valid till that session..The query works in
Informix but when run from perl file it say zero rows in new table...I
can't gess the problem
 
B

Bob Walton

SRam said:
I am using Perl DBI & Informix...I wrote a query to create a temporary
table in Informix database..I wrote a query to create a temporary
table from already created temp table..It didn't work...In Informix
temp tables would be valid till that session..The query works in
Informix but when run from perl file it say zero rows in new table...I
can't gess the problem

Neither can we with no code. Question: Does anything else work in
Informix via Perl DBI? Did you check to see if the connection was
successful? That your statement handles were created successfully?
Suggestion: Try it using another driver, like maybe DBD::CSV, and see
if your DBI code works with that. If it does, then it's not your DBI code.
 
J

James Willmore

On 1 Sep 2003 05:59:13 -0700
I am using Perl DBI & Informix...I wrote a query to create a
temporary table in Informix database..I wrote a query to create a
temporary table from already created temp table..It didn't work...In
Informix temp tables would be valid till that session..The query
works in Informix but when run from perl file it say zero rows in
new table...I can't gess the problem

Temporary meaning - "I don't want this table to exist after the
session ends" -or- "This is a table I don't care about and will delete
after some period of time". Put another way, are you using something
like :
"CREATE TEMPORARY TABLE mytemp(id int )"
as your SQL (SQL statement provided is for a PostgreSQL datasource,
but I'm thinking Informix has something similar from the sounds of
your post)?

If so, then you need to create the table from within the script. The
table will only exist during the run of the script and be disposed of
when the script finishes. If you want a more permanent table, use a
simple 'CREATE' SQL statement and then 'DROP' the table when you are
through - either through the script or at the SQL client.

No RDBMS keeps a temporary table around when the session finishes - as
far as I know.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,293
Messages
2,571,505
Members
48,192
Latest member
LinwoodFol

Latest Threads

Top