| 11:09 pm on Feb 26, 2009 (gmt 0)|
You should be able to do something like this:
select * from log where status !="0";
| 11:28 pm on Feb 26, 2009 (gmt 0)|
This should give you what you want:
WHERE Number NOT IN (SELECT Number FROM log WHERE Status=0)
[edited by: LifeinAsia at 11:28 pm (utc) on Feb. 26, 2009]
| 12:18 am on Feb 27, 2009 (gmt 0)|
Thank you very much! It worked great!
I just learned something new today. Thank you!
| 12:28 am on Feb 27, 2009 (gmt 0)|
Oh, and welcome to WebmasterWorld [webmasterworld.com]!
| 12:33 am on Feb 27, 2009 (gmt 0)|
Thank you very much! I hope I can learn a lot and contribute to others!
| 6:20 pm on Mar 3, 2009 (gmt 0)|
I don't think != works, but <> seems to. So:
SELECT * FROM log WHERE status <> 5
works for me.
Is there an advantage to using LifeinAsia's method over this? The logic seems the same in both of them.
| 6:53 pm on Mar 3, 2009 (gmt 0)|
Completely different logic. Remember from the OP:
|If the record has status of "0" somewhere in the other row, then do not show |
With SELECT * FROM log WHERE status <> 0, you'd still select the 2nd row in the sample.
| 7:45 pm on Mar 3, 2009 (gmt 0)|
I see, I didn't read the question carefully. If a phone number ever has a status of 0, then don't select it. Thanks!