On Mon, Mar 9, 2015 at 10:12 AM, Eli Murray <ejmurra2@xxxxxxxxxxxxxxx> wrote: > Thank you all for your help. I'm following along with John McKown's > suggestion but when I run the update query I get "UPDATE 32956" but the > personid column in my rawdata table has null values for every record. > > Here's the exact query I ran: > > UPDATE rawdata SET personid = (SELECT personid FROM assignid WHERE > rawdata.personid = assignid.personid); My apologies. I really messed that one up. And your analysis is correct. I will plead "early morning brain failure". The UPDATE should look like: UPDATE CollegeData SET PersonID=SELECT PersonID from AssignID where CollegeData.Name = AssignID.Name & CollegeData.TotalSalary = AssignID.TotalSalary; > > I think the issue might be that it's only selecting records where personid > is the same in both tables and right now there are only null values in > rawdata.personid. What query should I write to SET rawdata.personid = > assignid.personid WHERE rawdata.employeename && rawdata.totalsalary = > assignid.name && assignid.totalsalary? > -- He's about as useful as a wax frying pan. 10 to the 12th power microphones = 1 Megaphone Maranatha! <>< John McKown -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general