Hi ALL ,
I have 2 tables . I need to write an insert script that should contain the logic of checking if the records are present in the destination table and then perform the insert accordingly .
so 2 tables
Source
ID | Type | Name |
1 | Dev | Rdread |
2 | Prod | Fdread |
3 | SIT | Qdread |
4 | PROD | Tdread |
ID | Type | Name | Date |
1 | Dev | Rdread | getdate() |
2 | Prod | Fdread | getdate() |
Like in this case Source contains 4 records and Destination 2 so before inserting i wish that it should check for both type and Name if those records are not present then insert so ideally in this case insert for
SIT | Qdread |
PROD | Tdread |