Do you know where your variables are? | |
PerlMonks |
DBD::ORACLE - empty strings in result while there supposed to be valuesby Ricardo (Initiate) |
on Oct 10, 2007 at 10:03 UTC ( [id://643914]=perlquestion: print w/replies, xml ) | Need Help?? |
Ricardo has asked for the wisdom of the Perl Monks concerning the following question:
Hi. Sorry if this turns out to be a newbie mistake, but I've run into an odd problem while using DBD::Oracle. For some reason, my sql statement results in empty strings. Instead of getting the value i want to see there is a "''," (please see below). The amount of columns (6 in this case) are correct. I'm using perl v5.8.8, DBD::Oracle v1.19, Oracle instantclient-basic - instantclient-devel and sqlplus. Does someone know what i'm doing wrong? How do i get the values correctly like in sqlplus? When i manually do a query with help of sqlplus of the Oracle instant client it is ok (see below). This is the result with the empty strings when using DBD::Oracle : main::(db1.pl:47): my $result = $sth->dump_results; '', '', '', '', '', '' '', '', '', '', '', '' '', '', '', '', '', '' '', '', '', '', '', '' '', '', '', '', '', '' 5 rows This is the result when using sqlplus : node1# ./sqlplus login/login@//ip:port/db SQL*Plus: Release 11.1.0.6.0 - Production on Wed Oct 10 10:36:34 2007 Copyright (c) 1982, 2007, Oracle. All rights reserved. Connected to: Oracle Compatible Release 9.2.0.4.0 Oracle Rdb OCI Server Release 7.1.6.2.1 - Production, Level 1.7 Oracle Rdb SQL Release 7.1.4.0.0 - Production SQL> select * from table; table1 ta table3 t table5 table 6 ------ -- ------ - ------ ------------- 004400 10 075935 0 075935 1 004400 10 075938 0 075938 1 520020 71 127464 0 127464 1 004400 10 075939 0 075939 1 004400 10 075945 0 075945 1 5 rows selected. SQL This is the code i'm using :
Thank you in advance, Ricardo
Back to
Seekers of Perl Wisdom
|
|