Re: Retrieving data from Oracle



PerlDiscuss - Perl Newsgroups and mailing lists ha scritto:

I'm migrating a perl application in postgres to Oracle.  Here, the data is
being retrieved as below.
>
> [...]
>
It looks like fetchrow_hashref() is not working with Oracle.  But I'm able
to retrieve the data through fetchrow_array.  Any idea why
fetchrow_hashref() is not working?

Probably, you are expecting your hash keys to be in lowercase, but they are uppercase or mixed case. Try enumerating all hash keys of your hashref.

If this is the problem, you can also connect to your
Oracle db with the additional `FetchHashKeyName' option, like:

    my $dbh = DBI->connect(
      'DBI:Oracle:...', $user, $pw,
      { FetchHashKeyName=>'NAME_lc' }
    );

Anyway, try to explain better what your problem is...

--
Cosimo

.



Relevant Pages

  • Retrieve case sensitive tables
    ... Oracle db. ... results in uppercase. ... "Mixed/Case" so when I retrieve the list I need to obtain the exact ...
    (microsoft.public.dotnet.framework.adonet)
  • Validating / enumerating ISO currency symbols
    ... is there a method to validate a given 3-letter ISO currency code, eg AUD,USD ... etc and retrieve associated data such as symbol and # of decimals? ... Or a way of enumerating thru the known set of these would be good enough. ... can only see these features via a culture, ...
    (microsoft.public.dotnet.framework)
  • How to GetDecimal from database by ColumnName (NOT: by column number) ?
    ... Normally I retrieve an value from a database record by enumerating ... Decimal localvar = reader.GetDecimal; ...
    (microsoft.public.dotnet.languages.csharp)