Yammyguy Posted July 30, 2009 Share Posted July 30, 2009 Hello, I'm hoping someone can answer my question.. I'm trying to run a query to return only rows that have a value in a specific column. I've already tried running this: SELECT * FROM [TABLE] WHERE DEVICE_ID = 60 AND DEVICE_CUSTOMER IS NOT NULL The problem is that this still returns blank rows because it's NOT NULL, but it doesn't have any data. I would like only the rows that HAVE some sort of text in there? Any quick solutions anyone? Thanks in advance! ~C. Quote Link to comment https://forums.phpfreaks.com/topic/168138-solved-selecting-based-on-colum-only-containing-values/ Share on other sites More sharing options...
trq Posted July 30, 2009 Share Posted July 30, 2009 SELECT * FROM [TABLE] WHERE DEVICE_ID = 60 AND DEVICE_CUSTOMER <> "" Quote Link to comment https://forums.phpfreaks.com/topic/168138-solved-selecting-based-on-colum-only-containing-values/#findComment-886808 Share on other sites More sharing options...
Yammyguy Posted July 30, 2009 Author Share Posted July 30, 2009 SELECT * FROM [TABLE] WHERE DEVICE_ID = 60 AND DEVICE_CUSTOMER <> "" DOUBLE QUOTES!!!! I tried this query, but only used single quotes... ..duh. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/168138-solved-selecting-based-on-colum-only-containing-values/#findComment-886813 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.