Last post Feb 09, 2009 10:05 AM by SGWellens
Feb 08, 2009 07:46 PM|zoltac007|LINK
I have a database with a field type TEXT that contains only numbers and I need to filter against it for all values Greater Than 400,000. The below query WHERE clause will not work - I tried to convert the field to integer but ACCESS says there is not enough
memory to complete. There are 157,000 records in the database.
Is there another way to compare MasterVB08222008.TotVal2> "400000" or is there another way to comvert the MasterVB08222008.TotVal2 field from TEXT to NUMBER (integer or other)?
WHERE (MasterVB08222008.PropClas="101") And (MasterVB08222008.LocZip Like "*23451*") And (MasterVB08222008.TotVal2> "400000")
Feb 08, 2009 10:00 PM|SGWellens|LINK
Integers only go up to 32K
Try long integer or floating point:
Clng(MasterVB08222008.TotVal2 ) > 400000
Feb 09, 2009 12:23 AM|zoltac007|LINK
Thank you - I did not know you could directly cast a type in an SQL statement. Is this a feature of ACCESS 2007 or has it always been available in SQL?
Feb 09, 2009 10:05 AM|SGWellens|LINK
Is this a feature of ACCESS 2007
It is a Access feature. For SQL Server, you use CAST.