MS Query convert text to #

  • Thread starter Thread starter Shane
  • Start date Start date
S

Shane

I am querying a data base that is returning a number as
text. Is there a way to convert the text to an actual
number in the query, before it is returned to excel???
Thanks to everyone that replies.
 
In Microsoft Query, you can create a calculated field. For example, if
the field name is ItemCode:

Click in a blank column heading
Type an expression to convert the text to a number, e.g.:
ItemCode+0
or
CLng(ItemCode)

Return the data to Excel
 
Have the same issue of trying to convert a text value like '20120101' to a number.

Both +0 and CLng methods failed when I tried this so it might depend on the particular database and ODBC

The database was Pervasive SQL V 11.
 
Back
Top