Hello,
thank you and sorry for asking a FAQ.
I've fixed my problem now by:
select user_id, username from phpbb_users where user_id not in
(select ban_userid from phpbb_banlist where ban_userid is not null);
but still your explanation feels illogical
to me even though I know you're right...
On
# [EMAIL PROTECTED] / 2006-08-18 10:00:20 +0200:
On 8/18/06, Stephan Szabo [EMAIL PROTECTED] wrote:
When the subselect returns
NULL for at least one row, you fall into this sort of case.
x NOT IN (...) is equivalent to NOT(x IN (...)) which is
NOT(x = ANY (...))
x = ANY (...) is
Hello,
I have this strange problem that the following statement works:
phpbb= select user_id, username from phpbb_users
phpbb- where user_id in (select ban_userid from phpbb_banlist);
user_id | username
-+--
3 | La-Li
(1 row)
But the negative one returns nothing:
On Thu, 17 Aug 2006, Alexander Farber wrote:
I have this strange problem that the following statement works:
NULLs are not your friends. :(
phpbb= select user_id, username from phpbb_users
phpbb- where user_id in (select ban_userid from phpbb_banlist);
user_id | username
Stephan Szabo [EMAIL PROTECTED] writes:
On Thu, 17 Aug 2006, Alexander Farber wrote:
But the negative one returns nothing:
phpbb= select user_id, username from phpbb_users
phpbb- where user_id not in (select ban_userid from phpbb_banlist);
user_id | username
-+--
(0 rows)