in reply to Re^5: Perl connection string to Oracle Database
in thread Perl connection string to Oracle Database

Note that if d.ID is not unique, you will throw data away.

I would compare the number of rows by doing (another) subselect, selecting count(*), just to see whether it is the query or the retrieval that generates the different number of rows.

Also, try reducing the SQL to the minimum SQL needed to reproduce the problem between Java and Perl+TOAD.

Have you manually verified whether TOAD+Perl or Java do return the correct result?

Replies are listed 'Best First'.
Re^7: Perl connection string to Oracle Database
by fabrizio_start_perl (Novice) on Oct 27, 2015 at 11:50 UTC
    Thanks for the answer. I have run the query selecting  count(*) and the result is the same as retrieval but different from SQL developer client. The correct result seems Java one, TOAD+PERL are wrong. Regards, Fabrizio

      So the problem would lie in how Java connects to your database, as opposed to how TOAD and Perl connect to your database.

      This is not really a Perl problem. If you are using the Oracle database drivers, you will have to find out what versions the Java program is using and what versions TOAD and Perl are using. Also, make sure that both tests connect to the same database instance. Maybe inspecting the logfiles of JDBC and ODBC or the direct connection, or in the worst case, inspecting a network dump can tell you what the difference is between the two cases.

      You haven't shown us enough of your SQL to determine whether this could be a characterset encoding issue, but as this is not a Perl problem, this site isn't really the place to debug your SQL.

        Thanks for the answer. Seems that my SQL developer client use as driver orai18n.jar file. I would like to force into perl script the same driver but i don't known how to do it. how can i configure connection string to use java method instead of DBI library ? Thanks. Regards, Fabrizio