Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Dynamic Cursors

Re: Dynamic Cursors

From: Daniel A. Morgan <damorgan_at_exesolutions.com>
Date: Thu, 31 Jan 2002 20:46:01 +0000
Message-ID: <3C59AD08.8EB99765@exesolutions.com>

Your assumption that your other code is irrelevant is incorrect. Please post it all if you want help.

But you a quick note ... you are only selecting from a single table there is no reason to type 'T_CUSTOMERS.RATE' when you could just type 'RATE'.

And are you really sure you need to do an ORDER BY in your cursor? It is very expensive if the processing does not need to be ordered.

Daniel Morgan

Tim Savage wrote:

> I am having trouble understanding why my code is not working.
>
> PROCEDURE P_CUSTOMER_LISTING(
> i_order IN VARCHAR2,
> o_Customer_ID OUT tblCustomerID,
> o_LastName OUT tblLastName,
> o_FirstName OUT tblFirstName,
> o_Phone OUT tblPhoneNumber,
> o_Cell OUT tblCell,
> o_Email OUT tblEmail,
> o_Rate OUT tblRate)
>
> IS
>
> CURSOR c_Customer_Listing IS
> SELECT T_CUSTOMERS.CUSTOMERID, T_CUSTOMERS.CONTACTLASTNAME,
> T_CUSTOMERS.CONTACTFIRSTNAME, T_CUSTOMERS.PHONENUMBER, T_CUSTOMERS.CELL,
> T_CUSTOMERS.EMAILADDRESS, T_CUSTOMERS.RATE
> FROM T_CUSTOMERS
> ORDER BY i_order;
>
> BEGIN
>
> NULL; -- there is more code but I think that it is irelavent
>
> END P_CUSTOMER_LISTING;
>
> I am trying to pass a variable to the cursor (i_order). However when I run
> the code it acts as if i_order is NULL. is this possible to pass the INPUT
> i_order to the cursor?
>
> Thank you,
> Tim Savage
  Received on Thu Jan 31 2002 - 14:46:01 CST

Original text of this message

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