Home » Developer & Programmer » Forms » Problem in Showing multiple values into one text box. (Ora 10G.xp)
Problem in Showing multiple values into one text box. [message #418612] Mon, 17 August 2009 13:25 Go to next message
gurusuryas
Messages: 49
Registered: March 2009
Location: Chennai
Member


Hi all,

How can i multiple row values into one text box. here text box is multi line type.
i have one table it has content column, it has number of rows. i need to show those data into one text box in form. how can i solve it?

i have attached sample form and table with data.

thanks
gurus
  • Attachment: CHAT.csv
    (Size: 0.32KB, Downloaded 111 times)
Re: Problem in Showing multiple values into one text box. [message #418613 is a reply to message #418612] Mon, 17 August 2009 13:32 Go to previous messageGo to next message
gurusuryas
Messages: 49
Registered: March 2009
Location: Chennai
Member

I have attached sample form.
Re: Problem in Showing multiple values into one text box. [message #418614 is a reply to message #418613] Mon, 17 August 2009 13:33 Go to previous messageGo to next message
gurusuryas
Messages: 49
Registered: March 2009
Location: Chennai
Member


This is my coding.



begin

--:block3.txt_to := :parameter.p_current_user||''||':'||:block3.txt_From;

-- go_item('txt_from');

insert into chat(fromid,toid,content)values(:block3.fromid,:block3.toid,:block3.txt_From);
:block3.txt_From:= null;
commit;
:block3.txt_to := :parameter.p_current_user||''||':'||:block3.txt_From;
go_item('txt_from');

declare
cursor c4 is select content from chat where toid = :block3.fromid;
rec1 c4%rowtype;
begin
open c4;
loop
fetch c4 into rec1;
exit when c4%notfound;

null;
end loop;
end;
--select content into :block3.txt_to from chat where toid= :block3.fromid;
end;

---------------------


thanks

Gurus
Re: Problem in Showing multiple values into one text box. [message #422616 is a reply to message #418614] Thu, 17 September 2009 21:03 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Re: Problem in Showing multiple values into one text box. [message #422657 is a reply to message #418614] Fri, 18 September 2009 02:43 Go to previous message
bahubcd
Messages: 36
Registered: July 2007
Location: Bangalore
Member
Execute the below code in SQLPLUS.
-------------------
select 'abc
'||'cde
'||'efg
'||'mno
'||'xyz' from dual;
-------------------
You would get output as
--
abc
cde
efg
mno
xyz
--
Why don't you try to do the below.
----------------------------------------
declare
L_text VARCHAR2(100) := NULL;
cursor c4 is 
   select content
     from chat 
    where toid = :block3.fromid;
L_cnt NUMBER :=0;
begin

--:block3.txt_to := :parameter.p_current_user||''||':'||:block3.txt_From;

-- go_item('txt_from');

insert into chat(fromid,toid,content)values(:block3.fromid,:block3.toid,:block3.txt_From);
:block3.txt_From:= null;
commit;
:block3.txt_to := :parameter.p_current_user||''||':'||:block3.txt_From;
go_item('txt_from');

--Removed your cursor execution
for C_rec in c4
LOOP
if L_cnt = 0 then
   L_text := L_text||C_rec.content;
else
   L_text := L_text||'
'||C_rec.content;
end if;
L_cnt := L_cnt + 1;
END LOOP;
YOUR_BLOCK.YOUR_TEXT_ITEM := L_text;
end;
----------------------------------------
Previous Topic: Navigation problem
Next Topic: can't view all clob column in forms
Goto Forum:
  


Current Time: Sun Dec 11 04:22:10 CST 2016

Total time taken to generate the page: 0.04216 seconds