Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Irfan.abdullah
Starting Member
9 Posts |
Posted - 2012-09-20 : 19:57:17
|
| Hi, Im making a multiplication table for 5 and 6. im using this statement:declarea number(2):=5;b number(2):=6;c number(2);beginfor c in 1..5loopdbms_output.put_line(a||'*'||c||' = '||a*c);dbms_output.put_line(b||'*'||c||' = '||b*c);end loop;end;/ My required results are:5 * 1 = 55 * 2 = 105 * 3 = 155 * 4 = 205 * 5 = 256 * 1 = 66 * 2 = 126 * 3 = 186 * 4 = 246 * 5 = 30Im getting5 * 1 = 56 * 1 = 65 * 2 = 106 * 2 = 12.....Any idea how I can fix this? I tried:declarea number(2):=5;b number(2):=6;c number(2);beginfor c in 1..5loopdbms_output.put_line(a||'*'||c||' = '||a*c);end loop;loopdbms_output.put_line(b||'*'||c||' = '||b*c);end loop;end;But this statement just hangs... it never shows the results.. froze my PC twice..THanks |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-09-20 : 20:39:06
|
For Oracle questions, please post at dbforums.com KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|