Prepare for your Next Interview
This is a discussion on Select row by repeating within the SQL forums, part of the Databases category; id no 101 2 102 3 103 1 i need a which is given below. i want to know the comment to know how i wil get this result 101 ...
|
|||
|
Re: Select row by repeating
set serveroutput on
declare id1 varchar2(25); j number:=0; begin for i in (select no from temp) loop while j select id into id1 from temp where no=i.no; dbms_output.put_line(id1); j:=nvl(j,0)+1; end loop; j:=0; end loop; end; |
|
|||
|
Re: Select row by repeating
declare
id1 varchar2(25); j number:=1; begin for i in (select no from temp) loop while j <=i.no loop select id into id1 from temp where no=i.no; dbms_output.put_line(id1); j:=j+1; end loop; j:=1; end loop; end; thanks for ur query but some error have came i changed little answer i got . |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Select within select | neeraj_sigh | SQL | 7 | 12-09-2007 04:59 AM |
| repeating the records in the output table ... | rathin007 | Data Warehousing | 2 | 10-26-2007 07:01 AM |
| Singleton select | sdresh | MainFrame | 2 | 09-11-2007 03:20 AM |
| I am not able to select the pop-up window | Geek_Guest | QTP | 0 | 07-12-2007 06:20 AM |
| Select a different value from the combo box | JobHelper | WinRunner | 1 | 12-26-2006 11:17 AM |