Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How do I modify a cursor declaration?
Hi Calvin,
I'm not sure if this is what you're looking for, but you could use = parameters in a cursor. Then you would get something like this:
CURSOR c_cursor (l_location dept.loc%TYPE) IS
SELECT deptno
, dname , loc
but it won't work for an order by... I did hear something about a = package called DBMS_SQL, that can be used for dynamic SQL, but I don't = have any experience with it myself.
Suc6!
Marga.
http://www.euronet.nl/~in004323
Calvin Crumrine <Calvin_Crumrine_at_dced.state.ak.us> wrote in message =
news:38615508.86B31FA2_at_dced.state.ak.us...
> I've been assigned to write a Pro*COBOL report program that needs to =
execute the same cursor
> twice with different order by clauses.
>
> I can declare two cursors that are identical except for the order by =
clause, but since I don't
> need to execute both cursors simultaneously it seems as if I should be =
able to declare one
> cursor with a variable order by clause, if I can only figure out how =
to do it.
>
> Any ideas? I'm pretty sure I could convince my boss to let me write it =
in PL/SQL if I could
> show him how it could be done there, but nobody in the office really =
knows much about anything
> except COBOL. We're just switching to Oracle.
>
> Thanks.
Received on Thu Dec 23 1999 - 17:07:31 CST
![]() |
![]() |