Re: Question on a select

From: Madison Kelly <linux(at)alteeve(dot)com>
To: PgSQL General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Question on a select
Date: 2005-01-02 06:58:20
Message-ID: 41D79B8C.5090909@alteeve.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruno Wolff III wrote:
> SELECT a_name, a_type, a_dir, a_<others> FROM table_a
> WHERE a_name, a_type, a_dir NOT IN (
> SELECT b_name, b_type, b_dir FROM table_b)
> ;
>
> In pre 7.4 versions or if there are NULLs in the key columns for table_b
> then you probably want to use NOT EXISTS (with a moodified WHERE clause)
> instead on NOT IN.

Hi Bruno,

Thank you for replying! I tried your example but I am getting a
syntax error:

tle-bu=> SELECT file_name, file_parent_dir, file_type FROM file_info_1
WHERE file_name, file_parent_dir, file_type NOT IN (SELECT fs_name,
fs_parent_dir, fs_type FROM file_set_1);
ERROR: syntax error at or near "," at character 78

I just replied to Vincent's post with a lot of detail on what I am
trying to do and how my DB is constructed. His second example worked but
I also had a syntax error on his first example. This program will be
working with very large data sets so I would love to get your method
working so that I could try benchmarking them to see which, in my
application, would be most effective.

Thank you very kindly for helping!

Madison

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2005-01-02 07:52:49 Re: Question on a select
Previous Message Madison Kelly 2005-01-02 06:51:00 Re: Question on a select