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: sql quiz

Re: sql quiz

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1998/01/06
Message-ID: <34b2af92.5765603@www.sigov.si>#1/1

On Tue, 06 Jan 1998 13:41:27 -0800, Avinash Deshpande <avdeshpa_at_cisco.com> wrote:

>Hi,
>A simple solution will be..
>create a sequence start with 1, increment by 1.
>
>& run this query..
>
>select decode(C1-seq.nextval,0,C1,seq.nextval) from t1;

Hm, your DECODE does exactly the same as   SELECT seq.nextval FROM t1;

>U will get the result.

Yes, but I don't think this is the result Naren wanted ;-)

>
>Avinash

Regards,


Jurij Modic                             Republic of Slovenia
jurij.modic_at_mf.sigov.mail.si		Ministry of Finance
============================================================
The above opinions are mine and do not represent any official standpoints of my employer Received on Tue Jan 06 1998 - 00:00:00 CST

Original text of this message

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