select problem with integer field
Posted in 1994
Danekj — — source: Informix-list mailing list archive (1991-1998)
I need to do a SELECT where I match only the last (rightmost) 7 digits of
an integer field. If you imagine that field xyz is an integer or serial
type field I want to do the following:
SELECT * FROM a_table WHERE xyz LIKE '%8765432';
I would like to find all records where xyz has 8765432 as the last digits,
like 98765432 or 1238765432 etc. I need to somehow fool SQL into
converting or thinking that xyz is a character type field. I now get the
error that wildcard matches are not allowed for integer type fields.
Is there a way? Thanks in advance.