Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to add row num to reports

Status
Not open for further replies.

dhmikoc

Programmer
Mar 15, 2006
1
TR
Hi,

I want to add row number like 1,2,3 to my listed reports ,

how to do this ?

thanks..
 
One easy way is:
Code:
SQL> select ROWNUM seq, COUNTRY_CODE, COUNTRY_NAME
  2  from
  3    (
  4     select COUNTRY_CODE, COUNTRY_NAME
  5     from   ST_COUNTRIES
  6     where  COUNTRY_NAME like '%ST.%'
  7     order by COUNTRY_CODE
  8    )
  9  
SQL> /

       SEQ COUNTRY_CODE    COUNTRY_NAME
---------- --------------- ------------------------------
         1 BAR             ST. BARTHELEMY
         2 EAS             ST. EUSTATIUS AND SABA
         3 KNA             ST. KITTS AND NEVIS
         4 LCA             ST. LUCIA
         5 MAM             ST. MARTIN/ST. MAARTEN
         6 SHN             ST. HELENA
         7 SPM             ST. PIERRE AND MIQUELON
         8 VCT             ST. VINCENT AND THE GRENADINES

8 rows selected

SQL>

[sup]Beware of false knowledge; it is more dangerous than ignorance.[/sup][sup] ~George Bernard Shaw[/sup]
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
My website: Emu Products Plus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top