Face Posted December 16, 2005 Share Posted December 16, 2005 Hi, I've got a column (serialcat) in table (serial) which contains a combination of characters - axzyodu. These characters could be in any order for each row. What I want to do is to display all rows that contain 'o' or 'd' but not 'y' in the serialcat column. So I'd expect back examples of : axdo xuod zoda oax xdu etc..... Any help appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
fenway Posted December 23, 2005 Share Posted December 23, 2005 You can use regular expressions to accomplish your task: SELECT serialcat FROM serial WHERE serialcat REGEXP '[od]' AND serialcat NOT REGEXP 'y' Hope that helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.