Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> i want to print in single line pl/sql block

i want to print in single line pl/sql block

From: saiba <saibhasker_at_gmail.com>
Date: Tue, 28 Aug 2007 03:18:56 -0700
Message-ID: <1188296336.903895.292130@i38g2000prf.googlegroups.com>


how can i get output like this

1 = 1
1+2 = 3
1+2+3 = 6
........
1+2+3+4+5+6+7+8+9+10 = 55;
i have to print same order.

i don't got it but i wrote something see and modify and send reply

---
declare
v number := 0;
v1 number;
begin
  for i in 1..10 loop
    	for j in 1..i loop
     		v:= v+j;
    		 dbms_output.put_line(j);
     		if j<>i then
			dbms_output.put_line(' + ');
     		end if;
	end loop;
		dbms_output.put_line(' = '||v);
                v:=0;
  end loop;
end;
/
Received on Tue Aug 28 2007 - 05:18:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US