I would like to write a SELECT statement that considers an integer field (the range of values is 0 to 99) to be a string and searches for a partial match.
For example, if you specify "7", "17" or "73" will be a hit.
The SQL statements you want here can be run on SQL Server, Oracle, or PostgreSQL.
Is there any way?
You can perform a partial match search by casting fields.
SELECT* FROM Table WHERE CAST (Integer Field ASTEXT) LIKE '%7%';
© 2024 OneMinuteCode. All rights reserved.