DBI-Problem

DBI-Problem

am 07.12.2005 17:02:33 von engin-a.guelen

--=_alternative 00581FCAC12570D0_=
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello Tim,

i am using Perl Version 5.8.7 with DBI v1.48 and DBD-Oracle 1.16.
Yesterday I tried to write about 100 Records into a table with serveral=20
dozen columns within an Oracle 9i - Database.

I prepared the insert - stmt once and for each record modified the=20
respective perl-variables.
After about half a dozen records the script just hang (DBI-Trace hang when =

dumping the different bind variables).

I could solve the problem by closing and re-preparing the statement-handle =

after every insert.

Do you know about any problems in this area ?

Thanks in advance!

Mit freundlichen Grüßen / Kind Regards

Engin Gülen
------------------------------------------------------------ --------------
Sinius GmbH
Chief Information Office (CIO)
Applikationsmanagement

Solmsstr. 83
D-60486 Frankfurt am Main

Telefon: ++49 069 7584-1758
Fax: ++49 069 7584-1766
Mail: engin-a.guelen@sinius.com

Web-Site: www.sinius.de

Ein Unternehmen von Siemens Business Services
------------------------------------------------------------ --------------

--=_alternative 00581FCAC12570D0_=--

RE: DBI-Problem

am 07.12.2005 22:19:02 von Ron.Reidy

Get an event 10046 trace. That will show you the exact problem.

--
Ron Reidy
Lead DBA
Array BioPharma, Inc.

-----Original Message-----
From: Engin-A Guelen [mailto:engin-a.guelen@sinius.com]=20
Sent: Wednesday, December 07, 2005 9:03 AM
To: dbi-users@perl.org
Subject: DBI-Problem


Hello Tim,

i am using Perl Version 5.8.7 with DBI v1.48 and DBD-Oracle 1.16. =
Yesterday I tried to write about 100 Records into a table with serveral=20
dozen columns within an Oracle 9i - Database.

I prepared the insert - stmt once and for each record modified the=20
respective perl-variables.
After about half a dozen records the script just hang (DBI-Trace hang =
when=20
dumping the different bind variables).

I could solve the problem by closing and re-preparing the =
statement-handle=20
after every insert.

Do you know about any problems in this area ?

Thanks in advance!

Mit freundlichen Grüßen / Kind Regards

Engin Gülen
------------------------------------------------------------ -------------=
-
Sinius GmbH
Chief Information Office (CIO)
Applikationsmanagement

Solmsstr. 83
D-60486 Frankfurt am Main

Telefon: ++49 069 7584-1758
Fax: ++49 069 7584-1766
Mail: engin-a.guelen@sinius.com

Web-Site: www.sinius.de

Ein Unternehmen von Siemens Business Services
------------------------------------------------------------ -------------=
-

This electronic message transmission is a PRIVATE communication which =
contains
information which may be confidential or privileged. The information is =
intended=20
to be for the use of the individual or entity named above. If you are =
not the=20
intended recipient, please be aware that any disclosure, copying, =
distribution=20
or use of the contents of this information is prohibited. Please notify =
the
sender of the delivery error by replying to this message, or notify us =
by
telephone (877-633-2436, ext. 0), and then delete it from your system.

DBD::CSV "LEFT JOIN" problem

am 08.12.2005 08:35:13 von pacqa100

Hi
I've got an issue with DBD::CSV and doing an SQL join on multiple tables. (It
may be my understanding of SQL is slightly off, but any help rendered would be
much appreciated.

I'm trying to do what I know as a "Left Join', where I get all the data from
the 'Left hand' table, and details from the joined table if there is a record,
or a blank field where there is no link. The data is basically:

Names.csv ------------
Name,Age
Peter,21
John,20
Julie,19

Ages.csv -------------
Age,Description
21,Perfect age
20,Two decades


The SQL I would use is:
SELECT Names.Name, Names.Age, Ages.Description
FROM [Names] LEFT JOIN Ages ON Names.Age = Ages.Age;

But DBD::CSV (that is, SQL::Statment) doesn't support the 'LEFT JOIN' syntax.
Instead, I have to use:
SELECT Names.Name, Names.Age, Ages.Description
FROM Names, Ages WHERE Names.Age = Ages.Age;
This works where the records have a match, but this completely omits the
record if there is no match.
How can I do a 'LEFT JOIN' with DBD::CSV? Any hints or ideas welcome.


Peter Lovett
--------------------------------------
Plus Plus Pty Ltd
phone: 02 9972 xxxx
mobile: 0419 147 xxx
email: xxx @ plusplus.com.au
web: www.plusplus.com.au
---------------------------------------

RE: :CSV "LEFT JOIN" problem

am 08.12.2005 15:56:07 von rjk-dbi

pacqa100@yahoo.com.au [mailto:pacqa100@yahoo.com.au] wrote:

> The SQL I would use is:
> SELECT Names.Name, Names.Age, Ages.Description
> FROM [Names] LEFT JOIN Ages ON Names.Age = Ages.Age;
>
> But DBD::CSV (that is, SQL::Statment) doesn't support the 'LEFT JOIN'
> syntax.

According to the docs, SQL::Statement does support left joins.

http://search.cpan.org/~jzucker/SQL-Statement-1.14/lib/SQL/S tatement/Syntax.
pod#SELECT

Perhaps you need to upgrade to the latest version of SQL::Statement.

Ronald