맞춤검색


1.ÇÁ·Î½ÃÀú »ý¼º. 
	CREATE OR REPLACE package types as 
		type cursorType is ref cursor;
	end; 

	CREATE OR REPLACE procedure SP_CURSOR_TEST(ret_cursor out types.cursorType, p_num out number, p_text out varchar2 ) 
	is
	begin
		select 3 , 'test3' into p_num, p_text from dual;

		open ret_cursor for 
			SELECT 
			*
			FROM COM_SAMPLE;
	end;



2.sql xml Àû¿ë¿¹½Ã.
Q_com_sample.xml ÆÄÀÏÂüÁ¶.
sql id="list_cursor_proc"
sql_id="list_cursor_proc_out_test"
			
				{ call SP_CURSOR_TEST(@:CURSOR, @:sp_test_num, '@:sp_test_text') }
			
			
				SELECT @@sp_test_num, @@sp_test_text from dual
			



3. CURSOR Å¸ÀÔ ÇÁ·Î½ÃÀú È£Ãâ¹æ¹ý.
/caf/samples/com_sample_complex.jsp ÆÄÀÏÂüÁ¶.


4. ÇÁ·Î½ÃÀú Å¸ÀÔ»ç¿ë½Ã º¯¼ö±¸ºÐ ¼³¸í.
IN/OUT TYPE
@@º¯¼ö¸í - IN -
@:º¯¼ö¸í - OUT NUMBER
'@:º¯¼ö¸í' - OUT VARCHAR2
@:CURSOR - OUT CURSOR

CURSOR Å¸ÀÔÀÌ ¾Æ´Ñ OUT ÀÇ °æ¿ì¿¡´Â dbmanager.getGlobalParams()   ¸Þ¼Òµå¸¦ ÅëÇØ ÇØ´ç º¯¼ö¸í¿¡ ÇØ´çÇϴ º¯¼ö°ªÀ» °¡Á®¿Ã ¼ö ÀÖÀ½.
sql type="uid" Çü½Ä°ú µ¿ÀÏÇÏ°Ô ÀÛµ¿ÇÔ.

5. Á¦¾à»çÇ×
select Äõ¸®ÀÇ °æ¿ì . item À¸·Î proc ¸¦ Ãß°¡ÇÒ ¼ö ¾øÀ½. proc ÀΠ°æ¿ì¿¡´Â º°µµ sql ·Î      À§ÀÇ 3¹ø°ú °°ÀÌ ±¸Çö.

Tracked by ClickAider