Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Efficiency question in PL/SQL
Please excuse the inexperience with this question, but I am looking to
perform the following: I have a table called foobar with columns A B C
and D
foobar
I want to be able to call the same package/procedure and with it return the column values I want. For example, I want columns A and C this time, but next time the user wants A C and D. I could create a bunch of cursors for each combination I could expect the user to ask and then do an IF statement on the parameters they pass in, but is there a better way to do it?
I ask this because I am trying to create a C component that returns the data based on what parameters are passed in. If the user only wants to see two columns and not four, I am wondering if it is inefficent to do a search on all the columns and return all the data back to the object.
Sorry if this is "off-the-wall".
Thanks,
Sean
PS How much performance degredation occurs when you use the dynamic sql package when specifying a SQL statement that the WHERE clause could be different each time? Thanks again!
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Mar 31 2000 - 16:16:49 CST
![]() |
![]() |