MATCH Command

Post Reply
kzinda
Posts: 62
Joined: Fri Nov 30, 2001 6:18 am

MATCH Command

Post 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?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

MATCH Command

Post by mark »

Try converting id to a varchar before comparing

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