Author Topic: Looking for code to print a Number array  (Read 87 times)

0 Members and 1 Guest are viewing this topic.

Offline MrSpecialist

  • Sr. Member
  • *
  • Posts: 342
  • Karma: +1/-0
  • I'm an expert!
    • View Profile
Looking for code to print a Number array
« on: October 19, 2008, 04:09:28 PM »
Hi forum,
I \'ve been  trying to write a function which will have print ( Number 0r Character)
such as this ....


1
2 2
3 3 3
4 4 4 4
5 5 5 5 5


in this sequence
then will output this.

aaa
bbb bbb
ccc ccc ccc
dddd dddd dddd dddd
ggggg ggggg ggggg ggggg ggggg


I tried this but know i am just a Beginner here

Code: [Select]
CREATE OR REPLACE FUNCTION test_numberarray
(numberarr in number ) RETURN NUMBER is
val number := 0 ;
val1 NUMBER := 0;

BEGIN
for i in 1 .. numberarr loop
val1 := i + val1;
val := Val1;
dbms_output.put_line(\'The number array is :- \'|| val1 ||\' \'|| val);
END loop;

Return val1;

End;

Can any body pls point me out to the right direction? Thanks a lot.

Thanks in advance

Techronnati | where technology never sleeps

Looking for code to print a Number array
« on: October 19, 2008, 04:09:28 PM »

Mountain View

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
130 Views
Last post August 28, 2008, 12:48:34 PM
by JusticeLeague
0 Replies
168 Views
Last post September 17, 2008, 12:00:11 PM
by CyborgRepublic
0 Replies
61 Views
Last post April 02, 2009, 05:33:27 AM
by CyborgRepublic
0 Replies
62 Views
Last post December 10, 2014, 06:55:24 AM
by MoneyRepublic
1 Replies
96 Views
Last post November 29, 2016, 02:52:03 AM
by h2obubbler

Posting Disclaimer: Any individual may post a message in this forum and may do so anonymously. Therefore, the sole author is exclusively and entirely responsible for all opinions in that message. They do not represent the official opinions of Techronnati, its administrators or moderators or the Techronnati Management. Techronnati is merely acting as an impartial conduit for constitutionally protected free speech and is not responsible and will not be held liable for the content of such messages. All images and service logos are trademarks of their respective owners.