I have an ETL process that seems to work well in SQL Server, but I am trying to port it to Postgresql and running into something I don't understand.
I create a table called c_production in the first step. I then want to update all the values of c_production.myValue based on a join with a lookup table called previous_type_year. In SQL Server the following code works fine:
update c_production
set myValue = PTY.myValue
FROM c_production CP JOIN previous_type_year PTY
on CP.StFips = PTY.STFIPS
AND CP.comcode = PTY.comcode
AND CP.Year = PTY.YEAR
However if I try this with Postgresql I get the same value over and over for myValue. I really don't grok what it's doing. Any tips that would point me to why these two systems treat this query so differently?