Change datatype on fly in SQL statement

G

Guest

Hello, I'm using Office 2003 on Win XP.

In Access, I'm trying to circumvent having to reformat a poorly formed temp
table in which a field consisting of numbers is cast as TEXT.

All I need is to change the data type on the fly in a SQL statement. I
working from a module, so I need the SQL syntax to do this. I guess you can't
change the datatype in an ORDER BY using something like: CDBL([FieldName]) ?
---or if you can then my syntax is wrong...

....A.STRUCT_TYP, A.POLE_TYPE, " & CDBL(A.HEIGHT) & ", A.CLASS_WEGT;"

Can someone help me out here...let me know if I'm not clear enough...

Thanks for the assistance.
 
G

Guest

If all you want to do is to sort the field numerical then use the VAL function.

Val([YourField])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top