Home » Developer & Programmer » Forms » Display rownum in tabular form
Display rownum in tabular form [message #419586] Mon, 24 August 2009 06:39 Go to next message
MABDULLAH
Messages: 1
Registered: August 2009
Location: PAKISTAN
Junior Member
HOW CAN I DISPLAY ROWNUM WHILE ENTERING DATA IN TABULAR FORM LIKE

1 ABC
2 XYZ
3 DEF


Re: Display rownum in tabular form [message #419611 is a reply to message #419586] Mon, 24 August 2009 08:21 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This question has already been asked (and answered); please, search the board for more information.
Re: Display rownum in tabular form [message #419946 is a reply to message #419586] Wed, 26 August 2009 04:49 Go to previous messageGo to next message
sharjeelshafqat
Messages: 33
Registered: August 2009
Location: Pakistan
Member

begin
select rownum,column_name into v_field1,v_field2 from table name
exception
when no_data_found then
null;
when too_many_rows then
select rownum,column_name into v_field1,v_field2 from table name
when others;
select rownum,column_name into v_field1,v_field2 from table name
end;
Re: Display rownum in tabular form [message #419985 is a reply to message #419946] Wed, 26 August 2009 06:03 Go to previous message
cookiemonster
Messages: 12422
Registered: September 2008
Location: Rainy Manchester
Senior Member
sharjeelshafqat wrote on Wed, 26 August 2009 10:49
begin
select rownum,column_name into v_field1,v_field2 from table name
exception
when no_data_found then
null;
when too_many_rows then
select rownum,column_name into v_field1,v_field2 from table name
when others;
select rownum,column_name into v_field1,v_field2 from table name
end;


What on earth do you think that's going to achieve?

And why are you re-running the query in the exception handlers? If it failed once it's not really going to work a 2nd time.

And will you please read the orafaq forum guide and follow the posting guidelines.
Previous Topic: Hyperlink On text Item
Next Topic: Validations before commiting to database
Goto Forum:
  


Current Time: Thu Dec 08 20:20:54 CST 2016

Total time taken to generate the page: 0.13117 seconds