Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: NUMBER-precision in view?
in the view definition, i'm wondering about expression:
DECODE(code, 'CODE', 'GAI', 'GAI') AS SITECODE,
isn't this equivalent to the expression:
'GAI' AS SITECODE, ? the way the decode expression reads to me is: if code = 'CODE' then return 'GAI' else return 'GAI' end-if what am i missing here ?
"Håkan Wahlberg" <hakan.wahlberg_at_boliden.se> wrote in message
news:38F601CC.869FAAB6_at_boliden.se...
> Creating av view like this:
>
>
> CREATE OR REPLACE VIEW DHG9GCOMPOSIT ( MSLINK,
> SITECODE, DHNUMBER, S_START, S_END,
> X, Y, Z, CODE,
> AU, AG, CU, ZN,
> PB )
> AS SELECT
> ROUND(id*100000+sect_start*100) AS MSLINK,
> DECODE(code, 'CODE', 'GAI', 'GAI') AS SITECODE,
> id AS dhnumber,
> sect_start AS s_start,
> sect_end AS s_end,
> northing AS x,
> easting AS y,
> z,
> code,
> au, ag, cu, zn, pb
> FROM BLG9GCOMPOSIT
>
> gives data:lenght, data_precision and data_scale 0 (zero) on
first
> column, MSLINK.
> Is there a way to excplicit define this in a view? Something
like
> CREATE OR REPLACE VIEW DHG9GCOMPOSIT ( MSLINK NUMBER(10,3),
> SITECODE, DHNUMBER, S_START, S_END ....etc
>
> Thanks in advance for any answer.
> /Håkan Wahlberg
>
>
>
>
Received on Sun Apr 16 2000 - 00:00:00 CDT