something new for me - didn't use this clause in SQL before but now need convert to teradata:
merge into tt_Pop as a
using tt_PHV as b on a.id = b.id
when matched then
update set ID = b.id,NRW = b.NRW,DepositsSum = b.DepositsSum,
when not matched then
insert(ID,NRW,,DepositsSum, First_DateID, Exit_DateID, ExitReason)
values(b.cd,b.NRW,b.DepositsSum,b., CAST(CAST(((CURRENT_TIMESTAMP)(FORMAT 'YYYYMMDD')) AS VARCHAR(100)) AS INTEGER),20990101,'NA');
it's not works - i get this error: Invalid MERGE-INTO statement: Update of Primary index or partition column is not allowed .
any help, please!