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. 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 <> "" 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! 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
Archived
This topic is now archived and is closed to further replies.