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 -> Use of SP?

Use of SP?

From: Hassi <hassi_at_nospam.com>
Date: Mon, 17 Dec 2007 09:58:48 +0100
Message-ID: <fk5do9$tcb$1@aioe.org>


Hi!

In our system the user can work offline by synchorinzing the server database to a local Oracle Express (Oracle Express 10g on windows platform) database. I have one table (call it pricelist) that contains salesparts with pricing info. In the system a user can search for a salesparts number and based on several criterias the correct price should be fetched from the pricelist table.

  1. If condition A, B, C and D are satisfied fetch that row from the pricelist table.
  2. If condition A, B,C and E are satisfied fetch that row from the pricelist table.
  3. If condtion A,B,C are satisfied fetch that row from the pricelist table.
  4. If condtion A, C, F are satisfied fetch that row from the pricelist table.
  5. Finally fetch baseprice which always exist

I'm not a DBA but my thought for this was to create a stored procedure returning a ref cursor and send in the input parameters (like product number, customer number, quantity etc) and then basically execute queries in number order (I mean following the criterias above) and as soon as the query returns records I will exit the SP and return the recordset. Is this the way to go to tackle tasks like this or am I walking towards a dead end?

Regards
Hassi Received on Mon Dec 17 2007 - 02:58:48 CST

Original text of this message

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