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!

Getting next number in sequence.

Status
Not open for further replies.

Gatorajc

MIS
Mar 1, 2002
423
US
I have a table that looks something like this.

OrderID Product Seq CustID
1 xyz 16 a494
2 fji 17 a494
3 ere 18 a494

I want to get next number in Seq. I have seen something with NoCount but have no clue how to use it.

AJ
[americanflag]

Do you feel lucky?


 
I am not really sure of wht u r looking for but if u want the next Seq No for a particular custID then u can use this query


select max(seq) +1 from TBL where custid = 'a494'

Sunil
 
Sorry Sunil didnt thing about where I was posting this. It is a pervasive DB and the +1 sytax does not work.

AJ
[americanflag]

Do you feel lucky?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top