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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Function that will increment a number by 1 each time

Status
Not open for further replies.

shricky

Programmer
Mar 6, 2007
17
US
i need it to perform like a "sequence" in Oracle at least conceptually. I am wanting some function that increments each row by 1 (almost acting like a primary key for that row).
 
Running-total(1) will work, but only when the data is fetched in the right order. Otherwise the server will generate sequences in a different order than expected. Make sure you sort properly by applying sorts in the query..

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top