If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Am I using a bind variable

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-06-04, 13:57
chuck_forbes chuck_forbes is offline
Registered User
 
Join Date: Dec 2003
Posts: 1,072
Am I using a bind variable

If I have a package body like the following. Is p_num considered a bind variable in this situation, or should I be rewriting this:

CREATE PACKAGE BODY dummy_pg
AS

PROCEDURE do_something(p_in IN NUMBER)
IS
CURSOR conn_csr (p_num VARCHAR2) IS
SELECT *
FROM dual
WHERE 1 = p_num;

search_num number;
BEGIN
FOR user_rec IN conn_csr(p_in) LOOP
--do something
END LOOP;
END;
END;

-Chuck
Reply With Quote
  #2 (permalink)  
Old 12-06-04, 14:17
WilliamR WilliamR is offline
Registered User
 
Join Date: Sep 2004
Location: London, UK
Posts: 564
Yes, that's a bind variable.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On