I've been assigned a task to create an automated data insert process, where new data is taken from a table that exists in one server, and needs to be inserted into another table in another server. Per the DBA, I am not allowed to add in either of the servers as linked servers and therefore am forced to use SSIS to complete this task. The data that I am to take from the original table is generated based on the below SQL query that outputs an INT column and a VARCHAR column.
SELECT DISTINCT (Primary_Transaction_ID)
,Transaction_STATUS
FROM DB1.dbo.Table1
WHERE Primary_Transaction_ID IS NOT NULL;
In addition, the data that I will be inserting into the other table, has to be unique, and I cannot insert in data, that I have already inserted into the table before. I have created the table in the other server with data type INT for "Primary_Transaction_ID" which is also the Primary Key and data type char(8) for "Transaction_Status".
So far I have created an Execute SQL Task in SSIS, which runs the above query, and stores the "Full Result Set" into a variable with data type "Object".
How do I go about, splitting this "Object" variable into two columns, with the same data types as the two columns in the destination table that I have created. While also ensuring that the data that I am inserting, is new data and not data that I have previously inserted into the table.
I plan on running this process daily through task scheduler after it is completed. Thanks in advance, any help with this would be greatly appreciated.
Edit:
This question has been closed and referred to a similar question in which the person is attempting to insert unique data and not duplicates. That question does not answer my question, and does not face the same issue in which SSIS has to be used due to denied permissions on Linked Servers. There are multiple parts to my question, and the referred question, answers maybe a singular portion of my question.