<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Easy Stored Procedure Output</title>
	<atom:link href="http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/</link>
	<description>Steve Karam's Oracle Blog</description>
	<lastBuildDate>Tue, 24 Jan 2012 01:33:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: The Oracle Alchemist</title>
		<link>http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/comment-page-1/#comment-44510</link>
		<dc:creator>The Oracle Alchemist</dc:creator>
		<pubDate>Tue, 24 Jan 2012 01:33:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/#comment-44510</guid>
		<description>Susan, did you create it as a function (like #1 and #2) or a procedure (like #3)?  Can you post your creation and execution along with the error?  Perhaps if I can see what you did it won&#039;t be so useless.</description>
		<content:encoded><![CDATA[<p>Susan, did you create it as a function (like #1 and #2) or a procedure (like #3)?  Can you post your creation and execution along with the error?  Perhaps if I can see what you did it won&#8217;t be so useless.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Susan Henderson</title>
		<link>http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/comment-page-1/#comment-44509</link>
		<dc:creator>Susan Henderson</dc:creator>
		<pubDate>Tue, 24 Jan 2012 01:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/#comment-44509</guid>
		<description>The function compiles but I get this error when i try to execute it:
 identifier &#039;testfunc&#039; must be  declared.

This code is so far useless.</description>
		<content:encoded><![CDATA[<p>The function compiles but I get this error when i try to execute it:<br />
 identifier &#8216;testfunc&#8217; must be  declared.</p>
<p>This code is so far useless.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nancy</title>
		<link>http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/comment-page-1/#comment-44491</link>
		<dc:creator>Nancy</dc:creator>
		<pubDate>Wed, 12 Oct 2011 19:46:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/#comment-44491</guid>
		<description>CREATE OR REPLACE PROCEDURE SCOTT.insert_test(i_acctperiod IN VARCHAR2 := NULL,
                                                                              o_cursor out sys_refcursor  )
                                                                      IS                                     
BEGIN 

DECLARE
 
    v_shorttermcutoffdatestr VARCHAR(20);
    l_query varchar2(1000);

    BEGIN   
  delete from test;
  commit;
    
  SELECT  TO_CHAR(add_months(E.HIREDATE,12),&#039;MM/DD/YYYY&#039;) into v_shorttermcutoffdatestr  FROM EMP1 E WHERE
  TO_CHAR(E.HIREDATE,&#039;Mon YYYY&#039;) = i_acctperiod;
  
  l_query :=&#039; INSERT INTO TEST
select  ename,empno from emp1
where hiredate   variable rc2 refcursor
 SQL&gt; exec insert_test(&#039;Dec 1980&#039;,:rc2);</description>
		<content:encoded><![CDATA[<p>CREATE OR REPLACE PROCEDURE SCOTT.insert_test(i_acctperiod IN VARCHAR2 := NULL,<br />
                                                                              o_cursor out sys_refcursor  )<br />
                                                                      IS<br />
BEGIN </p>
<p>DECLARE</p>
<p>    v_shorttermcutoffdatestr VARCHAR(20);<br />
    l_query varchar2(1000);</p>
<p>    BEGIN<br />
  delete from test;<br />
  commit;</p>
<p>  SELECT  TO_CHAR(add_months(E.HIREDATE,12),&#8217;MM/DD/YYYY&#8217;) into v_shorttermcutoffdatestr  FROM EMP1 E WHERE<br />
  TO_CHAR(E.HIREDATE,&#8217;Mon YYYY&#8217;) = i_acctperiod;</p>
<p>  l_query :=&#8217; INSERT INTO TEST<br />
select  ename,empno from emp1<br />
where hiredate   variable rc2 refcursor<br />
 SQL&gt; exec insert_test(&#8216;Dec 1980&#8242;,:rc2);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony</title>
		<link>http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/comment-page-1/#comment-44489</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Tue, 04 Oct 2011 08:51:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/#comment-44489</guid>
		<description>Hi Steve, I read the orginal thread before finding your blog post and while you give a great answer to the problem, you don&#039;t really answer the question as it relates to Oracle SQL developer. Yes, it&#039;s straight-forward in SQL*Plus and even more simple in Toad but comparatively speaking Oracle SQL developer forces you through hoops.... well, that&#039;s my opinion right now because I am new to SQL Developer and getting used to it. My searches online seem to suggest that the answer to &quot;How do I test a stored procedure that returns a ref cursor using Oracle SQL Developer?&quot; is - Don&#039;t. I would be very happy to be proved wrong.</description>
		<content:encoded><![CDATA[<p>Hi Steve, I read the orginal thread before finding your blog post and while you give a great answer to the problem, you don&#8217;t really answer the question as it relates to Oracle SQL developer. Yes, it&#8217;s straight-forward in SQL*Plus and even more simple in Toad but comparatively speaking Oracle SQL developer forces you through hoops&#8230;. well, that&#8217;s my opinion right now because I am new to SQL Developer and getting used to it. My searches online seem to suggest that the answer to &#8220;How do I test a stored procedure that returns a ref cursor using Oracle SQL Developer?&#8221; is &#8211; Don&#8217;t. I would be very happy to be proved wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thiru</title>
		<link>http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/comment-page-1/#comment-44387</link>
		<dc:creator>Thiru</dc:creator>
		<pubDate>Fri, 20 Aug 2010 12:35:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/#comment-44387</guid>
		<description>Hi i have question. How do i copy a table from one table to another created table of the same type using stored procedure without using cursor?</description>
		<content:encoded><![CDATA[<p>Hi i have question. How do i copy a table from one table to another created table of the same type using stored procedure without using cursor?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lopa</title>
		<link>http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/comment-page-1/#comment-44385</link>
		<dc:creator>Lopa</dc:creator>
		<pubDate>Thu, 12 Aug 2010 13:41:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/#comment-44385</guid>
		<description>Hi ,

Can anybody help me 

why I am getting  the bellow error while I am trying to use  Bulk Collect functionality in my code


1	11	3	Execution	ORA-06550: line 11, column 3:
PL/SQL: ORA-00947: not enough values
ORA-06550: line 7, column 3:
PL/SQL: SQL Statement ignored

my code

Create or replace TYPE TESTTYPE AS OBJECT (
   POLID varchar2(20),
   INCEPTDATE Date,
   SUBID number(10));
---------------------------------------------------
create or replace type emptype is table of TESTTYPE
--------------------------------------------------
Declare
vout emptype;
Begin
  select policyno,
         policy_inception_date,
         submission_id
  bulk collect into  vout     
  from mi_policy,mi_submission
  where policyno = policy_no
  and rownum&lt;1000;
 for i in vout.first..vout.last
 loop
    dbms_output.put_line(vout(i).polid);
 end loop;  
END ;</description>
		<content:encoded><![CDATA[<p>Hi ,</p>
<p>Can anybody help me </p>
<p>why I am getting  the bellow error while I am trying to use  Bulk Collect functionality in my code</p>
<p>1	11	3	Execution	ORA-06550: line 11, column 3:<br />
PL/SQL: ORA-00947: not enough values<br />
ORA-06550: line 7, column 3:<br />
PL/SQL: SQL Statement ignored</p>
<p>my code</p>
<p>Create or replace TYPE TESTTYPE AS OBJECT (<br />
   POLID varchar2(20),<br />
   INCEPTDATE Date,<br />
   SUBID number(10));<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
create or replace type emptype is table of TESTTYPE<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Declare<br />
vout emptype;<br />
Begin<br />
  select policyno,<br />
         policy_inception_date,<br />
         submission_id<br />
  bulk collect into  vout<br />
  from mi_policy,mi_submission<br />
  where policyno = policy_no<br />
  and rownum&lt;1000;<br />
 for i in vout.first..vout.last<br />
 loop<br />
    dbms_output.put_line(vout(i).polid);<br />
 end loop;<br />
END ;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lopa</title>
		<link>http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/comment-page-1/#comment-44384</link>
		<dc:creator>Lopa</dc:creator>
		<pubDate>Thu, 12 Aug 2010 11:14:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/#comment-44384</guid>
		<description>Hi Steven,

the above  workaround given by you is really help full.


I want to do some error handling like say NO-DATA-FOUND in the procedure.
Could you please advise how should I proceed for?</description>
		<content:encoded><![CDATA[<p>Hi Steven,</p>
<p>the above  workaround given by you is really help full.</p>
<p>I want to do some error handling like say NO-DATA-FOUND in the procedure.<br />
Could you please advise how should I proceed for?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emrah</title>
		<link>http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/comment-page-1/#comment-44328</link>
		<dc:creator>Emrah</dc:creator>
		<pubDate>Tue, 29 Dec 2009 22:42:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/#comment-44328</guid>
		<description>Hello Steve,
if I need just a select statement, do you think I still should prefer using out sys_refcursor in a Stored Porcedure for performance, or  Should I prefer a View instead of a Procedure.
which one could be faster.
My Select statement does not have a variable parameter, I mean if I write a procedure there will be no input parameters. There are just some constants for some criteria.</description>
		<content:encoded><![CDATA[<p>Hello Steve,<br />
if I need just a select statement, do you think I still should prefer using out sys_refcursor in a Stored Porcedure for performance, or  Should I prefer a View instead of a Procedure.<br />
which one could be faster.<br />
My Select statement does not have a variable parameter, I mean if I write a procedure there will be no input parameters. There are just some constants for some criteria.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradeep</title>
		<link>http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/comment-page-1/#comment-44001</link>
		<dc:creator>Pradeep</dc:creator>
		<pubDate>Fri, 07 Nov 2008 06:01:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.oraclealchemist.com/oracle/easy-stored-procedure-output/#comment-44001</guid>
		<description>Hey steve, thanks for the link you provided in DBA forums to this place. looks interesting! well i want to run a query several times with different inputs and store all outputs into a cursor/ record set and return to front end. 

I don&#039;t clearly know how to implement this from the front end, planning to test with a sample today . 
Please can you comment if you have any ideas in this ?</description>
		<content:encoded><![CDATA[<p>Hey steve, thanks for the link you provided in DBA forums to this place. looks interesting! well i want to run a query several times with different inputs and store all outputs into a cursor/ record set and return to front end. </p>
<p>I don&#8217;t clearly know how to implement this from the front end, planning to test with a sample today .<br />
Please can you comment if you have any ideas in this ?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

