Jump to content

Archived

This topic is now archived and is closed to further replies.

barkster

Query with Underscore?

Recommended Posts

I'm trying to do a query where a field does not contain an underscore in the value but will now work? How can I make this work?  Thanks

SELECT Category,Sorting
FROM Category
WHERE Category.Sorting Not Like '%_%'
ORDER BY Category ASC

Share this post


Link to post
Share on other sites
Found it had to add \

SELECT Category,Sorting
FROM Category
WHERE Category.Sorting Not Like '%\_%'
ORDER BY Category ASC

Share this post


Link to post
Share on other sites
Yeah, underscores are wildcard characters too, and thus need to be escaped if you want a literal underscore.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.