Text to Number SQL Conversion

Madness2MyMethd
04-19-2004, 12:59 PM
Hi all,

I'm passing SQL commands to an MS Access table in vb6. There is a field in the table I am trying to select that contains numbers, but in text format. Here is the SQL command I'm trying to execute:

SELECT * FROM WODEF WHERE UCD BETWEEN 0 AND 8000;

Problem is, UCD is a text field. I've searched and searched but I can't seem to get the CAST function to work with this query. Any suggestions (Besides modifying the DB. The DB is not mine to modify, so that is a last resort.) Thanks in advance.

joon_dani
04-19-2004, 01:08 PM
select * from wodef where val(ucd) between 0 and 8000;

Madness2MyMethd
04-19-2004, 01:15 PM
haha that simple. Thanks man, you rock.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum