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

Converting text string of numbers to numeric

Status
Not open for further replies.

crystalfun

Programmer
Feb 8, 2001
39
US
I have a text string of 8 numbers that I bring into Excel but I want them to come over as true numbers to then run other command from.

Whats the sql command to convert text numbers to real numbers.
 
You can use the CONVERT function.

SELECT convert(INT, MyNumber) FROM Tablename

That is if you're converting to an integer. You can use other like Decimal, etc...

Andel
andel@barroga.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top