Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: VARRAY Object types for Numbers, how to avoid roundoff?
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)
BANNER
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