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

SQL to convert string to number

Status
Not open for further replies.

ciarra41

Technical User
Sep 11, 2006
116
US
I've been trying to convert a text value into an integer and/or a number value.
Here's the syntax:
SELECT CInt([tblme.Lotphone]) AS Unitnum, tblme.custID
FROM tblme;
I'm getting the overflow error. Could someone advise me of a revision!

Many Thanks!!
 
What's the range of numbers in the Lotphone field? (theoretical largest and smallest)

John
 
Their all 10 digits long.
example:9145444747
 
9,145,444,747 can't be expressed as an integer. Consider using CLng() or CDbl() or Val(). Check Help on specifications if you have questions.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top