Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: VARRAY Object types for Numbers, how to avoid roundoff?

Re: VARRAY Object types for Numbers, how to avoid roundoff?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 22 Jul 1999 22:55:27 +0100
Message-ID: <932680823.17571.0.nnrp-08.9e984b29@news.demon.co.uk>

Well, I've read my script through 5 times now, and I STILL can't find the error -

the script:


drop table tdi_parameters;
drop type tdi_parameters_t;
drop type tdi_param_array_t;

CREATE TYPE TDI_param_array_t AS VARRAY(10) OF NUMBER(6);
/

CREATE or replace TYPE TDI_parameters_t AS OBJECT (

        TDI_param_array TDI_param_array_t );
/

create table tdi_parameters (
 tdi_id number(4) not null,
 tdi_param tdi_parameters_t,
 infile number(1),
 tdi_rise_rate number(6,2)
)
;

INSERT INTO TDI_parameters VALUES ( 3,
TDI_parameters_t(TDI_param_array_t(2, 2, 2, 2, 2, 2)), 1, 12.23);

SELECT TDI_param from TDI_parameters WHERE TDI_param = TDI_parameters_t(TDI_param_array_t(2, 2, 2, 2, 2, 2));

The result (preceded by v$version)



SQL> select * from V$version;

BANNER



Oracle8i Enterprise Edition Release 8.1.5.0.0 - Production PL/SQL Release 8.1.5.0.0 - Production
CORE Version 8.1.5.0.0 - Production
TNS for 32-bit Windows: Version 8.1.5.0.0 - Production NLSRTL Version 3.4.0.0.0 - Production

SQL> start var

Table dropped.

Type dropped.

Type dropped.

Type created.

Type created.

Table created.

1 row created.

no rows selected

SQL> spool off

--

Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk

Thomas Kyte wrote in message <379c84c1.36677499_at_newshost.us.oracle.com>... >
>A client application (or plsql) will not need the numformat -- its just sqlplus.
>I ran in 8.1.5 and got this as the result: >

>Here, this shows sqlplus picks up on the scale correctly but still will obey a
>numformat if set. I did not have any issues with regards to not being able to

>select the data though, i could not reproduce that.
>
>



Received on Thu Jul 22 1999 - 16:55:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US