SQL Typecasting
-
Is it possible? I need to typecast a string to number and then use a "<" comparison. Any ideas? - Xavier
-
Is it possible? I need to typecast a string to number and then use a "<" comparison. Any ideas? - Xavier
Yes it is possible. But, this will be a very costly calculation depending on the query and number of rows affected. http://msdn.microsoft.com/library/en-us/acdata/ac\_8\_con\_03\_7uzy.asp?frame=true CAST (textField AS int) I assume you want to do something like this: select * from table where cast(column as int) > 4
-
Yes it is possible. But, this will be a very costly calculation depending on the query and number of rows affected. http://msdn.microsoft.com/library/en-us/acdata/ac\_8\_con\_03\_7uzy.asp?frame=true CAST (textField AS int) I assume you want to do something like this: select * from table where cast(column as int) > 4
This would have worked but for the fact that not every field can be converted to an int, meaning Access throws an error. I think I might just have to redesign this part of the database. - Xavier