Home » SQL & PL/SQL » SQL & PL/SQL » data type problem
icon5.gif  data type problem [message #220900] Thu, 22 February 2007 12:01 Go to next message
balaji23_d
Messages: 123
Registered: February 2007
Senior Member
In oracle procedure, can we pass more than 3000 characters In OUT parameter..How? give example

rgards,
Bala
Re: data type problem [message #220934 is a reply to message #220900] Thu, 22 February 2007 15:20 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If this is what you are asking, one way could be
CREATE OR REPLACE PROCEDURE prc_test (par_out OUT VARCHAR2)
IS
  l_out VARCHAR2(4000) := 'x';
BEGIN
  FOR i IN 1 .. 3200 LOOP
    l_out := l_out || 'x';
  END LOOP;
  
  par_out := l_out;
END;
/

DECLARE
  v_out VARCHAR2(4000);
BEGIN
  prc_test (v_out);
  dbms_output.put_line('Length = ' || TO_CHAR(LENGTH(v_out)));
END;
/

Length = 3201
Re: data type problem [message #221275 is a reply to message #220934] Mon, 26 February 2007 02:40 Go to previous message
balaji23_d
Messages: 123
Registered: February 2007
Senior Member
Thank you littlefoot... working fine
Previous Topic: Commit inside trigger
Next Topic: user_objects - difference between 2 columns
Goto Forum:
  


Current Time: Thu Dec 05 12:18:19 CST 2024