MS Query convert text to #

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

Debra Dalgleish

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
 
Joined
Jan 16, 2013
Messages
1
Reaction score
0
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.
 

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

Similar Threads


Top