Quetions on Joins

From: Alex <alex(at)meerkatsoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Quetions on Joins
Date: 2003-08-31 16:56:54
Message-ID: 3F5228D6.7020009@meerkatsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a query where I want to filter out records from table_a if a
field in table_a matches in table table_b. Basically table_b defines the
filter.

If table_b however is empty i dont get any results

SELECT A.value_one FROM table_a AS A, table_b AS B WHERE A.value_two <>
B.value_two;
or
SELECT A.value_one FROM table_a AS A, table_b AS B WHERE A.value_two <>
B.value_two AND B.value_two NOTNULL;

Only work if the there is a value in table_b.
Could anyone tell me if there is a way to do that ?

Thanks a lot
Alex

PS: I'd like to thank here persons who reply rather than sending the
message per mail.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alex 2003-08-31 17:03:52 SELECT Question
Previous Message Jefim M 2003-08-31 15:50:09 NFS performance tuning