pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SQL Query Validate Records Multiple Tables - Help Needed
3+ messages / 3 participants
[nested] [flat]

* SQL Query Validate Records Multiple Tables - Help Needed
@ 2007-05-15 13:17 Paul251 <savetheweb@gmail.com>
  2007-05-15 22:32 ` Re: SQL Query Validate Records Multiple Tables - Help Needed Rodrigo De León <rdeleonp@gmail.com>
  2007-05-16 06:59 ` Re: SQL Query Validate Records Multiple Tables - HelpNeeded Bart Degryse <Bart.Degryse@indicator.be>
  0 siblings, 2 replies; 3+ messages in thread

From: Paul251 @ 2007-05-15 13:17 UTC (permalink / raw)
  To: pgsql-sql

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: SQL Query Validate Records Multiple Tables - Help Needed
  2007-05-15 13:17 SQL Query Validate Records Multiple Tables - Help Needed Paul251 <savetheweb@gmail.com>
@ 2007-05-15 22:32 ` Rodrigo De León <rdeleonp@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Rodrigo De León @ 2007-05-15 22:32 UTC (permalink / raw)
  To: pgsql-sql

On May 15, 8:17 am, Paul251 <savethe...@gmail.com> 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=262...




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: SQL Query Validate Records Multiple Tables - HelpNeeded
  2007-05-15 13:17 SQL Query Validate Records Multiple Tables - Help Needed Paul251 <savetheweb@gmail.com>
@ 2007-05-16 06:59 ` Bart Degryse <Bart.Degryse@indicator.be>
  1 sibling, 0 replies; 3+ messages in thread

From: Bart Degryse @ 2007-05-16 06:59 UTC (permalink / raw)
  To: pgsql-sql

I'm working on something similar at the moment. Don't know about you, but I have an additional problem: I have to deal with rather large datasets (>20000 recs per query) to be moved between the two databases (Oracle and PostgreSQL in my case). After doing lots of performance test, for me the conclusion was that dblink doesn't really work, dbi-link works but has way too much overhead and is way to slow.
So finally I installed plperlu and wrote some functions of my own and these work at a very acceptable speed. Transferring data between two different Oracle databases was on average not faster than between Oracle and PostgreSQL.

>>> Rodrigo De León <rdeleonp@gmail.com> 2007-05-16 0:32 >>>
On May 15, 8:17 am, Paul251 <savethe...@gmail.com> 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=262... 


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2007-05-16 06:59 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-05-15 13:17 SQL Query Validate Records Multiple Tables - Help Needed Paul251 <savetheweb@gmail.com>
2007-05-15 22:32 ` Rodrigo De León <rdeleonp@gmail.com>
2007-05-16 06:59 ` Re: SQL Query Validate Records Multiple Tables - HelpNeeded Bart Degryse <Bart.Degryse@indicator.be>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox