Re: oraperl problem: &ora_titles, &ora_types, &ora_lengths
Date: 8 Feb 1995 05:24:49 GMT
Message-ID: <3h9kj1$9g4_at_pearl.whoi.edu>
Arthur Yasinski (ayasinsk_at_nofc.forestry.ca) wrote:
: I am encountering a weird anomaly with oraperl 2.004 and my Oracle v7.0.16
: database. Normally, everything works fine, but some times, the three functions
: &ora_titles, &ora_types, and &ora_lengths neglect to return the first item.
: For example, under SQL*Plus, I have the following table:
: SQL> describe station
: Name Null? Type
: ------------------------------- -------- ----
: NAME CHAR(25)
: ID CHAR(3)
: PROV CHAR(12)
: FMR CHAR(2)
: WXDATAHD CHAR(10)
: PCPNDATAHD CHAR(10)
: OP_TIME NUMBER(2)
: OP_RANGE CHAR(5)
: SINONO CHAR(5)
: TIMESRPD CHAR(2)
: WHENRPD CHAR(11)
: USETIMEPCP CHAR(2)
: TZ_CORRECT CHAR(5)
: MINSPSTHRR CHAR(4)
: USE CHAR(2)
: USEPCPNID CHAR(3)
: PCPNCODE NUMBER(2)
: AGENCY CHAR(3)
: INT_ID NUMBER(3)
: However, if I execute the snipet of code below in oraperl, I get different
: results:
: $query = "select * from station";
: $csr = &ora_open($lda, $query ) || die;
: _at_titles = &ora_titles( $csr, 0 );
: (_at_lengths) = &ora_lengths( $csr );
: (_at_types) = &ora_types( $csr );
: $num_cols = scalar(_at_titles);
: print "Titles: _at_titles \n";
: print "Lengths: _at_lengths \n";
: print "Types: _at_types \n";
: print "Number of Cols: $num_cols \n";
: This oraperl script returns:
^ | +-- It looks like something printed here (a space).
I tried a similar piece of code and it worked. I'm running Oracle 7.0.16 on a Sun (SunOS 4.1.3), Oraperl 2.4.
I will try with your table def & exact code and let you know what I get.
David Hiltz
dhiltz_at_whsun1.wh.whoi.edu
Unix System Administrator
Northeast Fisheries Science Center
######&_at_&###### Received on Wed Feb 08 1995 - 06:24:49 CET