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!

Converting Data Types

Status
Not open for further replies.

oldduffer

Technical User
Jan 14, 2002
34
0
0
GB
All

Does anyonw know if it is possible to convert the data type of a field from within a query. I have a char field (on the MSSQL7 database at the other end) and want to convert this into a numeric. Access wont allow me to perform a CONVERT(numeric, <fieldname>) as this is apparently not a recognised function. The database is connected through a link table.


SELECT x, y, convert(numeric, z)
FROM alphabet
WHERE x = &quot;blahblahblah&quot;


Yours Stumped

Old Goat
 
try cdbl(z) to convert to a double precision number

cint(z) to an integer

Andy
 
Have you tried the Val function. What kind of data is in the char field? God Bless
Mike ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top