The sample data in my table is:
AccountKey ParentAccountKey CreatedOn UpdatedOn
61 58 2021-04-17 00:00:00.000 2021-05-17 00:00:00.000
101 51 2021-04-17 00:00:00.000 2021-05-17 00:00:00.000
40 36 2021-04-17 00:00:00.000 2021-05-17 00:00:00.000
I want to update the 1st row of the table from a csv file which has data:
AccountKey ParentAccountKey CreatedOn UpdatedOn
61 97 2021-04-17 00:00:00.000 2022-05-18 00:00:00.000
Basically, I want to execute something similar to :
update Tablename
set ParentAccountKey = 97,
Updatedon = CURRENT_DATE()
where AccountKey =61;
But the updated values of the columns should come from the csv file,
and preferably dynamic so that code can be reused for multiple tables.