• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1153
  • Last Modified:

Addition functionality in SQL Statement?

I have the following SQL Statement:

SELECT TOP 1 MORTGEE_NUMBER FROM MORTGEE ORDER BY MORTGEE_NUMBER DESC

This returns the highest "AutoNumber" in my table - MORTGEE.

I would like to add one to this number, via sql if possible, or any other suggestion.  This is an integer.

THanks,

JD
0
jamesdean666
Asked:
jamesdean666
2 Solutions
 
hernst42Commented:
You can try:

SELECT TOP 1 MORTGEE_NUMBER+1 FROM MORTGEE ORDER BY MORTGEE_NUMBER DESC
0
 
TimCotteeCommented:
Hello jamesdean666,

SELECT TOP 1 MORTGEE_NUMBER + 1 FROM MORTGEE ORDER BY MORTGEE_NUMBER DESC

Or

Select Max(Mortgee_Number)+1 From Mortgee


Regards,

TimCottee
0
 
jamesdean666Author Commented:
Perfect, thanks.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now