Finally got it working in ODBC:
SELECT top 1 rating FROM ratings WHERE ISNUMERIC (rating) and VAL(rating & '""') > 6 ORDER BY VAL(rating & '""')
The trick is to put the double quotes inside single quotes. The ISNUMERIC is required as otherwise a value like '20-50' might be returned. Thanks for...
Created a small test application for this: The basic request is thus: I have a table named RATINGS with a text type field named RATING. Field values can be either NULL numeric and non-numeric. I want to return the row where rating is larger or equal to a target value but is nearest to the target...
The SQL statement is passed directly to the ODBC driver. Microsoft ODBC drivers only support SQL, be it for Access, Excel or even text files. For Excel and text files there are known limitations as these are not natively SQL based. Access is however SQL based and therefore I would think the ODBC...
No, it's not a pass-through. I create an ODBC connection to the Access database using the VB.Net OdbcConnection class. Normally the SQL statements that work inside access also work in the ODBC connection. I know there are discrepancies for instance using '%' and '*' in a LIKE clause, I wonder if...
I want to select rows in a table using a relational operator on a character type column. I want to do a numeric comparison. I can do that within Access in the following way:
SELECT DISTINCT colname FROM table WHERE VAL(colname & "") > 12
When I try to do that using the Access ODBC driver...