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: Auto generating Sequences !!

Re: Auto generating Sequences !!

From: chani <chanakam2000_at_gmail.com>
Date: 11 Apr 2006 08:55:42 -0700
Message-ID: <1144770942.745766.171440@i40g2000cwc.googlegroups.com>


Thank everyone who helped me.
I learned lot.
Instead of my horrible requirement I found a simple solution for my requirement.
sql code are bellow

create or replace trigger t

    before insert
    on loan_payment
    for each row
DECLARE
    num number(2,0)
begin

    select count(loan_number)+1 into num from loan where loan_number=:new.loan_number ;

    select num into :payment_number from dual; end;

It will automatically fill it is howmanyth payment for a lon when new payment insert. (this is xactly what i wanted) (I can generate required format with some modification)

But now I want the prize for best horrible idea of year.!!!!!

I will seek your help next time i get another horrible idea.

than you all again! Received on Tue Apr 11 2006 - 10:55:42 CDT

Original text of this message

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