Page 1 of 1

MATCH Command

Posted: Sat Feb 18, 2006 7:53 am
by kzinda
When trying to search against a row ID using the MATCHES command:

SELECT id FROM PATN WHERE id MATCHES '43%;

I get everything with a 4 as the first character. If I change '43%' to '43f%', which I know has at least 10 hits, I get nothing. How do I make the command work?

MATCH Command

Posted: Mon Feb 20, 2006 11:29 am
by mark
Try converting id to a varchar before comparing

where convert(id, 'varchar' ) matches '43%'