Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7A9819FBE97 for ; Tue, 15 May 2007 19:32:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 66762-06 for ; Tue, 15 May 2007 19:32:42 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 995AE9FBE9E for ; Tue, 15 May 2007 19:32:42 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id ED6B430909; Wed, 16 May 2007 00:32:40 +0200 (MET DST) From: =?iso-8859-1?q?Rodrigo_De_Le=F3n?= X-Newsgroups: pgsql.sql Subject: Re: SQL Query Validate Records Multiple Tables - Help Needed Date: 15 May 2007 15:32:26 -0700 Organization: http://groups.google.com Lines: 24 Message-ID: <1179268346.212283.25370@w5g2000hsg.googlegroups.com> References: <1179235046.748509.130630@y80g2000hsf.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Complaints-To: groups-abuse@google.com In-Reply-To: <1179235046.748509.130630@y80g2000hsf.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: w5g2000hsg.googlegroups.com; posting-host=201.224.12.22; posting-account=zGrw3Q0AAADU1m7dOiE5S6vTNtvJ7FdA To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/134 X-Sequence-Number: 28414 On May 15, 8:17 am, Paul251 wrote: > Hello... > > I am trying to validate a asset number (10 Characters) from one table > to another table. Problem is they are in two different DB's and > haven't done that before? > > Basically trying to take record 1 from Table 1/DB1 and validate it > against record 1 in Table 2/DB2 if the record doesn't exist in Table 2/ > DB2 update the flag to N in Table 1/DB1..... Seems easy but been > working on it for about a week now no luck.... :-( I have the mostly > the same colums in both tables but Table 2/DB2 is the host table I > need to verify from.... > > Does anyone have any help or code to help me do this?? > > Thanks See: http://www.postgresql.org/docs/faqs.FAQ.html#item4.17 https://projects.commandprompt.com/public/pgsql/browser/trunk/pgsql/contrib/dblink/doc/query?rev=26230