Re: advice

From: Paul Ganainm <paulsnewsgroups(at)hotmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: advice
Date: 2003-10-25 20:31:52
Message-ID: MPG.1a04ede6524c7d4d989694@news.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


andrei(dot)ivanov(at)ines(dot)ro says...

> I'm planning to something like
> INSERT INTO first_table
> SELECT * FROM second_table s WHERE
> NOT EXISTS (SELECT 1 FROM first_table WHERE id = s.id)

What about

INSERT INTO first_table T1
(SELECT * FROM second_table T2 WHERE myValue
NOT IN (SELECT myValue FROM T1 WHERE T1.id = T2.id))

Something like that?

Paul...

--

plinehan__AT__yahoo__DOT__com

C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04 W2K Pro

Please do not top-post.

In response to

  • advice at 2003-10-22 19:58:12 from Andrei Ivanov

Browse pgsql-novice by date

  From Date Subject
Next Message Tony and Bryn Reina 2003-10-25 21:55:00 libpq.dll and SSL
Previous Message Muhyiddin A.M Hayat 2003-10-25 09:15:29 Re: selection limit