Re: Quetions on Joins

From: Alex <alex(at)meerkatsoft(dot)com>
To: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
Cc: PgSQL General ML <pgsql-general(at)postgresql(dot)org>
Subject: Re: Quetions on Joins
Date: 2003-09-01 02:58:19
Message-ID: 3F52B5CB.7020308@meerkatsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ron,
the idea is to provide a table where users can define filters. But it
this table may be as well empty.

Alex

Ron Johnson wrote:

>On Sun, 2003-08-31 at 11:56, Alex wrote:
>
>
>>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 ?
>>
>>
>
>If the filter is empty, how can you filter anything?
>
>
>
>>PS: I'd like to thank here persons who reply rather than sending the
>>message per mail.
>>
>>
>
>What does that mean?
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alex 2003-09-01 03:07:29 Prevent from Deletion
Previous Message Weiping He 2003-09-01 02:43:33 how to group by a joined query?