How to copy records from one table to another, and then update one field with data from another table using sql queries? There are three tables:
CREATE TABLE [vedomost] ( [id] INTEGER PRIMARY KEY, [fio] VARCHAR(80), [dolgnost] VARCHAR(80), [stavky] FLOAT, [work_days] INTEGER, [shtraf] FLOAT, [nalog] FLOAT, [prochee] FLOAT, [avans] FLOAT, [premija] FLOAT, [month] VARCHAR(30), [year] INTEGER, [point] VARCHAR(80), [n_month] INTEGER, [status] BOOLEAN); CREATE TABLE [dolgnosty] ( [id] INTEGER PRIMARY KEY, [dolgnost] VARCHAR(80)); CREATE TABLE [stavky] ( [id] INTEGER PRIMARY KEY, [dolgnost] VARCHAR(80), [stavka] FLOAT, [year] VARCHAR(30), [month] VARCHAR(30), [point] VARCHAR(80), [n_month] INTEGER); The question is as follows. It is necessary to copy from the dolgnosty table all the values of the [dolgnost] field into the stavky table, and then in the stavky table, insert the values into the [stavka] field from the vedomost table, from the [stavky] field.