Home » Other » Client Tools » Executing procedure in Oracle SQL Developer (merged 3)
Executing procedure in Oracle SQL Developer (merged 3) [message #349207] Fri, 19 September 2008 05:57 Go to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member

While trying to execute a procedure in Oracle SQL Developer 1.5 I am getting below message in Running log.

Connecting to the database SXVNDB01.
Process exited.
Disconnecting from the database SXVNDB01.




Regards,
Oli
Re: Not being able to Run procedure through Oracle SQL Developer 1.5 [message #349223 is a reply to message #349207] Fri, 19 September 2008 06:33 Go to previous messageGo to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member
While trying to execute a procedure in Oracle SQL Developer I am getting the below code

DECLARE
  P_PROFILE_ID NUMBER;
  RC1 globalPkg.RCT1;
BEGIN
  P_PROFILE_ID := NULL;

  TEST_GRN_COUNT(
    P_PROFILE_ID => P_PROFILE_ID,
    RC1 => RC1
  );
  -- Modify the code to output the variable
  -- DBMS_OUTPUT.PUT_LINE('RC1 = ' || RC1);
END;

I tried to run the query but showing no result.I am getting the below message in Running log but not being able to see the data.
Connecting to the database SXVNDB01.
Process exited.
Disconnecting from the database SXVNDB01.


Re: Not being able to Run procedure through Oracle SQL Developer 1.5 [message #349229 is a reply to message #349207] Fri, 19 September 2008 07:00 Go to previous messageGo to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member
DECLARE
  P_PROFILE_ID NUMBER;
  RC1 globalPkg.RCT1;
BEGIN
  P_PROFILE_ID := NULL;

  TEST_GRN_COUNT(
    P_PROFILE_ID => P_PROFILE_ID,
    RC1 => RC1
  );
  -- Modify the code to output the variable
  -- DBMS_OUTPUT.PUT_LINE('RC1 = ' || RC1);
END;


While trying to execute above query in Oracle SQL Developer I am getting error:
PLS-00306:wrong number or types of argument in call to PUT_LINE


I don't think it's a matter of displaying the cursor - a cursor is an abstract internal thing controlling the way that you access data. It's not something that can be displayed like a piece of text
How can I see the output data? Using bind variable I can see the data but Oracle SQL Developer is not accepting bind variable.

Thanks,
OLi

[Updated on: Fri, 19 September 2008 07:04]

Report message to a moderator

Executing procedure in Oracle SQL Developer [message #349230 is a reply to message #349207] Fri, 19 September 2008 07:10 Go to previous messageGo to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member
DECLARE
  P_PROFILE_ID NUMBER;
  RC1 globalPkg.RCT1;
BEGIN
  P_PROFILE_ID := NULL;

  TEST_GRN_COUNT(
    P_PROFILE_ID => P_PROFILE_ID,
    RC1 => RC1
  );
  -- Modify the code to output the variable
  DBMS_OUTPUT.PUT_LINE('RC1 = ' || RC1);
END;

what need to be done to get the data for the above code
While trying to execute above query in Oracle SQL Developer I am getting error:
PLS-00306:wrong number or types of argument in call to PUT_LINE


I don't think it's a matter of displaying the cursor - a cursor is an abstract internal thing controlling the way that you access data. It's not something that can be displayed like a piece of text
How can I see the output data? Using bind variable I can see the data but Oracle SQL Developer is not accepting bind variable.

Thanks,
OLi
[Updated on: Fri, 19 September 2008 07:04]

Re: Executing procedure in Oracle SQL Developer [message #349231 is a reply to message #349230] Fri, 19 September 2008 07:12 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
In SQL*Plus, if you display a ref cursor in a bind variable, SQL*Plus will very nicely go off and fetch bakc all the data in that cursor, and print it for you.

In SQL Developer, you'll ned to write some code that isues Fetches against the cursor and then displays the values returned.
Re: Executing procedure in Oracle SQL Developer [message #349233 is a reply to message #349231] Fri, 19 September 2008 07:20 Go to previous messageGo to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member
What modififications I have to make in the above mentioned code?
Have to use Fetch into..?

Here's the procedure:


create or replace PROCEDURE  TEST_GRN_COUNTS
        ( 
          p_profile_id IN NUMBER DEFAULT NULL,
          RC1 OUT globalPkg.RCT1)
 is

begin 
  open RC1 for

        SELECT PROFILE_ID FROM GRN_TBL 
          WHERE PROFILE_ID=_profile_id;
						
	
end;


Is there no way to execute by just passing the value and hance get the result?
Regards,
Oli

[Updated on: Fri, 19 September 2008 07:25]

Report message to a moderator

Re: Executing procedure in Oracle SQL Developer (merged) [message #349239 is a reply to message #349207] Fri, 19 September 2008 07:42 Go to previous messageGo to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member
What modifications that need to be done to execute in Oracle sql developer?



Here's the procedure
create or replace PROCEDURE  TEST_GRN_COUNT
        ( 
          p_profile_id IN NUMBER DEFAULT NULL,
          RC1 OUT globalPkg.RCT1)
 is

begin 
  open RC1 for

        SELECT PROFILE_ID FROM GRN_TBL 
          WHERE PROFILE_ID=profile_id;
						
	
end;


[Updated on: Fri, 19 September 2008 07:53]

Report message to a moderator

Execute procedure in OSD [message #349242 is a reply to message #349207] Fri, 19 September 2008 08:05 Go to previous messageGo to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member
Can't we execute a procedure that returns a recursor in Oracle SQL Developer by just passing the value without have to modify the code?

Regards,
Oli
Re: Execute procedure in OSD [message #349245 is a reply to message #349242] Fri, 19 September 2008 08:25 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
How many times will you post the same topic?

Regards
Michel
Re: Execute procedure in OSD [message #349250 is a reply to message #349245] Fri, 19 September 2008 09:12 Go to previous messageGo to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member
Michel Cadot wrote on Fri, 19 September 2008 08:25
How many times will you post the same topic?

Regards
Michel




Quote:

Can't we execute a procedure that returns a recursor in Oracle SQL Developer by just passing the value without have to modify the code?



expecting a response.
Regards,
Oli

Re: Execute procedure in OSD [message #349253 is a reply to message #349250] Fri, 19 September 2008 09:15 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Olivia wrote on Fri, 19 September 2008 07:12

expecting a response.
Regards,
Oli



Why?
Nobody owes you any response especially when you repeatedly not comply with Posting Guidelines.
Re: Execute procedure in OSD [message #349258 is a reply to message #349253] Fri, 19 September 2008 09:31 Go to previous messageGo to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member
Ana,

I just got irritated by your response! and probably most of the guys in this forum...so please!!





Regards,
Oli

[Updated on: Fri, 19 September 2008 09:37]

Report message to a moderator

Re: Execute procedure in OSD [message #349262 is a reply to message #349258] Fri, 19 September 2008 09:47 Go to previous message
ThomasG
Messages: 3211
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
Can't we execute a procedure that returns a recursor in Oracle SQL Developer by just passing the value without have to modify the code?


No. Period.

Now stop YOUR irritation of most of the guys in this forum by repeatedly not complying with Posting Guidelines.
Previous Topic: sqlplus issue
Next Topic: How to open excel file from Oracle Application Unix form Server
Goto Forum:
  


Current Time: Thu Mar 28 17:03:44 CDT 2024