I have a unique requirement where the data in the SQL table is overwritten with new values when they are entered on the front end and its a data transfer application limitation not to overwrite but i need to have all the historical data for a given unique ID.
How can the data be moved ( for some rows which meet the criteria) to be moved a different table in realtime so that all the historical values are stored in the new table.
The current table looks like
when new values are added for existing VID and QueryID
The table values changes to
but i would like to move this data to a new table where it stores every instance and only for those rows which has QueryID like Q1 and Q2 and store all the historical values as well and would like to do this in realtime.
Please suggest how this can be done.