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: Fine points on analytic functions

Re: Fine points on analytic functions

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: 27 Nov 2004 03:29:34 -0800
Message-ID: <73e20c6c.0411270329.135f365d@posting.google.com>


dba_222_at_yahoo.com (Roger Redford) wrote in message news:<a8c29269.0411090809.28b6845_at_posting.google.com>...

> The problem is, I could not get the case statements
> to work in a stored procedure in version 817.
>
> Am I incorrect on this? Is there a way to use the
> case statements in 817?

No. CASE is not valid PL/SQL in 8i. However, if you use EXECUTE IMMEDIATE, it should work. The other way is to use the decode function. You also can simplify by making the incorrect length return a NULL: it doesn't get counted then and you don't need inline views. Something along these lines (I have not tested but it should work):
count(decode(length(field),3,1,NULL)) cnt_length3 and so on.

>
> Will case statements work in stored procedures in 9?

Yes.

> As for the length of the codes meaning something,
> this is not something that anyone thought of. It means
> that the code comes from different sources. It was
> a lucky accident, and I can use this now. Each code
> has an exact meaning. And we can also use the length
> for summary information.

Risky, but if it works who am I to complain? Received on Sat Nov 27 2004 - 05:29:34 CST

Original text of this message

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