Is it possible to consider numbers stored in a text field as number during a query or a sort?
In a text field the user should write text or number, it depends on another field, but during a query with a comparison as >= the number is treated like text, and the result is not what is espected.
The second field involved is used into the query, so there is no mix between text and numbers.
In Oracle, you would use the TO_NUMBER function, for example:
SELECT * FROM your_table
WHERE TO_NUMBER(this_column) >= some_value;
This statement will raise an error if "this_column" contains data different than numbers (for example, values like 'abc', 'a123', '#$%' etc.). It means that you'd have to, additionally, check for column value before using this function.
Furthermore, if you have index created on column "this_column", it would then NOT be used (but there's possibility for you to create an index based on this function, which would then be used in your queries).
There should be equivalent functions to TO_NUMBER in any database system you are using e.g. CONVERT/CAST in SQL Server. Sometimes you have to look hard to find them though. If you have a fixed length field or the data is added with blanks around it you might need to TRIM them off first.