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

Autonumber in text

Status
Not open for further replies.

kenche0820

Programmer
Aug 7, 2003
24
0
0
CA
I'm currently having a problem generating a unique ID because the field is text instead of number.

I tried using the max function in my query:
SELECT max(entityID) as maxID FROM Entity;

but it would return 9999 as the max even though there are other records with ID 10012, 10023, etc. Can I somehow alter my SQL statement to get the numeric maximum?

Thanks,

Kenneth

 
did you try this ?

SELECT max(CDbl(entityID)) as maxID FROM Entity;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top