Updating Query of 1 table from data in another

From: "Chris Preston" <chris(at)thetrafalgartravel(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Updating Query of 1 table from data in another
Date: 2008-10-13 19:23:14
Message-ID: 200810131923.m9DJN2Dh005486@mail2.trafalgar.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello all, I'm still new to postgres

If I have 2 tables with the following data structure

Agentno and agentname (along with many other fields) this table is called
agent_master

And I have another table with agentno and agentname. Table called
updatetable

When I add data in the updatetable, I want to write a query that will enter
the agentname field in the corresponding agent_master.agentname field based
on agent_master.agentno = updatetable.agentno

Thanks in advance

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2008-10-13 19:52:22 Re: Updating Query of 1 table from data in another
Previous Message Adrian Klaver 2008-10-13 19:08:10 Re: Order of trigger execution: AFTER DELETE ON EACH ROW doesn't appear to be working properly