Hi @Shambhu Rai ,
I think it would be something like:
MERGE INTO Authority as at USING customer as c
ON (at.CustomerId = c.CustomerId )
WHEN MATCHED AND at.Salesman2 = 'CVCLBS' THEN UPDATE SET
cardoffertype=(case
when (at.OpuCode='D' and at.issuerNumber=700669) or (at.OpuCode='A') then 'KO'
when LEN(TRIM(at.cardOffertype))=0 then 'ZZ'
else at.cardoffertype
end)
More info about merge:
https://docs.databricks.com/en/sql/language-manual/delta-merge-into.html
Kind Regards,
Wilko
Please do not forget to "Accept the answer” wherever the information provided helps you, this can be beneficial to other community members. If you have extra questions about this answer, please click "Comment".