phporcaffeine Posted January 24, 2007 Share Posted January 24, 2007 Example:column 'test' = '|48962||34545|'I need to be able to SELECT based on column 'test' but I may only have |48962| and not |34545|.I tried:SELECT col1, col2, col3 FROM tbl WHERE test LIKE |48962|but it didn't work, any ideas?-Thanks Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 24, 2007 Share Posted January 24, 2007 You need to surround strings with ''"SELECT col1, col2, col3 FROM tbl WHERE test LIKE '|48962|'""didn't work" is very vague. Be more specific. Quote Link to comment Share on other sites More sharing options...
phporcaffeine Posted January 24, 2007 Author Share Posted January 24, 2007 Okay I did surround in quotes ...SELECT col1, col2, col3 FROM tbl WHERE test LIKE '|48962|'I mean it returns an empty result set Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 24, 2007 Share Posted January 24, 2007 SELECT col1, col2, col3 FROM tbl WHERE test LIKE '%|48962|%' Quote Link to comment Share on other sites More sharing options...
phporcaffeine Posted January 24, 2007 Author Share Posted January 24, 2007 thank you Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 24, 2007 Share Posted January 24, 2007 No problem. 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.