Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: help with database

Re: help with database

From: TekDragon <TekDragon_at_hm.com>
Date: Tue, 18 Apr 2006 20:11:03 GMT
Message-ID: <rJb1g.16934$tN3.9873@newssvr27.news.prodigy.net>


I'm trying to get the value of customer_id that is created by the current user and use that for several other tables.

"Mark C. Stock" <mcstockX_at_Xenquery .com> wrote in message news:weWdnf2bgZ3-3tjZnZ2dnUVZ_umdnZ2d_at_comcast.com...
>
> "TekDragon" <TekDragon_at_hm.com> wrote in message
> news:0bb1g.48346$_S7.12049_at_newssvr14.news.prodigy.com...
> : I'm using Oracle as my database, and Dreamweaver to create the input
> forms.
> : I need to be able to pass a value that is created automaticlly by the
> : database via the use of a trigger. Everything works fine when the first
> user
> : inputs his/her data, but then I get an error message after that.
> :
> : Here is the trigger:
> : create or replace trigger wine_cust_trigger
> : before insert on wines
> : for each ro
> : begin
> : select customer_id into :new.customer_id from customer ;
> : end ;
> : /
> :
> : Here is the error message:
> :
> : Error Type:
> : Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
> : [Oracle][ODBC][Ora]ORA-01422: exact fetch returns more than requested
> number
> : of rows ORA-06512: at "LTRAUB.WINE_CUST_TRIGGER", line 2 ORA-04088:
> error
> : during execution of trigger 'LTRAUB.WINE_CUST_TRIGGER'
> : /phoenix/wines.asp, line 115
> :
> : Any help would be appreciated.
> :
> : Thanks.
> :
> :
>
> the error message is telling the truth -- for the first user, there
> apparently is one row in CUSTOMER, after that the 'exact fetch returns
> more
> than requested number' -- ie, your syntax is valid only if exacltly one
> row
> is returned, and the error message is telling you more than one row was
> returned
>
> what are you trying to do?
>
> ++ mcs
>
>
Received on Tue Apr 18 2006 - 15:11:03 CDT

Original text of this message

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