Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Want to Create Custom Cursor in Stored Procedure?
Hello Knowledge Source,
Can I create a customized cursor is a stored procedure on an Oracle backend based on parameters passed to the stored procedure? For example, as far as I know, an explicit cursor is declared like:
Declare Cursor as SELECT Field1, Field2, Field3 FROM table1 WHERE Field1
Is there a way to say something like:
DECLARE Cursor as StringVariable;
If this could work as I'm hoping, StringVariable could contain my own customized select statement. This way I could control the conditions. For example, I may want to declare the cursor as:
Declare Cursor as SELECT Field1, Field2, Field3 FROM table1 WHERE Field1
during one call to the stored procedure and define the cursor to be:
Declare Cursor as SELECT Field1, Field2, Field3 FROM table1 WHERE Field2
in the next call to the stored procedure.
I am using MS Access97 as the front-end. Is there a way to pass the string that I want evaluated in the cursor of the stored procedure in to
the stored procedure and then have the stored procedure declare a cursor
having the value of the variable passed in? For example, could I declare a cursor in the stored procedure as:
DECLARE Cursor as StringVariablePassedInToStoredProcedure;
??
I am new to PL/SQL and stored procedures.
Thank you very much!!!
Keith
Received on Tue Jun 13 2000 - 00:00:00 CDT
![]() |
![]() |