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 -> multiple cursor defs, vs NDS

multiple cursor defs, vs NDS

From: Job Miller <jobmiller_at_yahoo.com>
Date: 7 Jan 2002 12:10:36 -0800
Message-ID: <2edf8ed9.0201071210.2f477010@posting.google.com>


Multiple queries, all with the same very long select statement, just different columns in the where clause, or no where clause at all.

There is a finite number of possibilities though.

my lazy approach was to define the cursor returning all the records, so that I could define a record based on that cursor type and a ref cursor variable. I would use the real cursor if I needed the whole set.

I also defined a function that returned the same SQL statement with a different where clause to be used with Native Dynamic SQL to open the cursor using the ref cursor variable defined earlier.

This means in total I define a cursor and a function. But I don't know how much my application is actually suffering from the use of NDS as opposed to 15 explicitly defined cursors with paramaters. NDS would still be necessary in at least one of the cases though.

are there any more practical design ideas to handling multiple different where clauses all of the form (column=xxx) where column can be any column but with the flexibility to return all rows as well?

all those cursor definitions would be quite a drag. any thoughts or advice would be appreciated.

Job Received on Mon Jan 07 2002 - 14:10:36 CST

Original text of this message

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