Change datatype on fly in SQL statement

Q

quartz

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.
 
K

KARL DEWEY

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

Val([YourField])
 
Top