Re: [SQL] Postgresql function which compares values from both tables

2012-03-19 Thread Jayadevan M
Hi, > To: pgsql-sql@postgresql.org > Subject: [SQL] Postgresql function which compares values from both tables > > hi , > how to write a function which should read data from 2 tables having > same number of columns and should show the common values from those tables. If you w

Re: [SQL] Postgresql function which compares values from both tables

2012-03-19 Thread David Johnston
[SQL] Postgresql function which compares values from both > tables > > On 19/03/12 20:04, David Johnston wrote: > > You would need to install the "HSTORE" extension to convert the record > > into a key->value pair then perform the comparison on that. > > No, you

Re: [SQL] Postgresql function which compares values from both tables

2012-03-19 Thread Richard Huxton
On 19/03/12 20:04, David Johnston wrote: You would need to install the “HSTORE” extension to convert the record into a key->value pair then perform the comparison on that. No, you can do this just fine with a simple join. BEGIN; CREATE TABLE ta (id int PRIMARY KEY, d date, t text); CREATE TAB

Re: [SQL] Postgresql function which compares values from both tables

2012-03-19 Thread David Johnston
PM To: pgsql-sql@postgresql.org Subject: [SQL] Postgresql function which compares values from both tables hi , how to write a function which should read data from 2 tables having same number of columns and should show the common values from those tables. thanks

[SQL] Postgresql function which compares values from both tables

2012-03-19 Thread Rehan Saleem
hi , how to write a function which should read data from 2 tables having same number of columns and should show the common values from those tables. thanks