KNOWLEDGE BASE ARTICLE

ODBC Lookup Fails On Text Field When Searching Numbers

When building ODBC lookup zones, Umango will build the SQL query for you and it will attempt to accommodate the necessary single quotes around the search criteria. However, when searching a text field using numeric data, a data type mismatch error can occur. To accommodate this scenario, add the workaround below to your SQL query. The query below assumes the field AlphaNum is a text data type.

Instead of this...

Select * from [MyTable] where [AlphaNum] = <SearchValue>

Encase the search value in a replace method...

Select * from [MyTable] where [AlphaNum] = Replace(<SearchValue>,'','')

This will allow the query to work on alphanumeric field types when searching either data type.

Link to this article http://umango.com/KB?article=114