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 -> help with select into

help with select into

From: Laura Bellini <laura.bellini_at_compaq.com>
Date: 1998/01/14
Message-ID: <01bd2109$13d1c9e0$863612ac@pw48>#1/1

Hi.
I'm trying to do a fairly simple select into within a stored procedure, but I'm having difficulty getting the statement or statement thereafter to handle the situation when no data is returned.

Select	match_prod_id
into	new_prod_id_out
from	product_up_cross_sell
where	 product_up-cross_sell.base_prod_id = prod_id_in
and	product_up_cross_sell.match_type = 'U'

Prod_id_in is an incoming parameter.
If there is no row returned, this is fine - new_prod_id_out will be 'empty'.
What I want, however, is to populate new_prod_id_out with another variable's value if this select statement returns no rows.

I DO NOT want the procedure to hit an exception and end. All I want to do is fill in this variable with a value, and continue.

Does anyone know how to do this?

thanks.
Laura Bellini
laura_bellini_at_compaq.com Received on Wed Jan 14 1998 - 00:00:00 CST

Original text of this message

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