Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Update whole column in postgres sql

I need to update whole column selecting from another column

I tried this

update  turnoverrate_tm.dm_turnover_tmp_sales
set t.dmitm=w.dmitm
from turnoverrate_tm.w2nx3l04i as w
inner join turnoverrate_tm.dm_turnover_tmp_sales as t
on w.dmitm=t.sditm;`

`
and got this error
ERROR: column "t" of relation "dm_turnover_tmp_sales" does not exist
LINE 2: set t.dmitm=w.dmitm

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Help me in updating this column

>Solution :

This is how you update from another column

update  turnoverrate_tm.dm_turnover_tmp_sales as t
set dmitm= w.dmitm
from turnoverrate_tm.w2nx3l04i as w
where t.sditm=w.dmitm
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading