Forum Discussion

threw000's avatar
threw000
Copper Contributor
Jul 04, 2023

SSMS Help - Capturing Changes in the data and recording

Hello

 

Sorry in advance - I am new to SQL and SSMS. Please can I have some help with learning if the below is possible?

 

I will have an SSIS package feeding data to SQL with the below table. The 'Report_Completion_Date' field is a write over field so if 'Client_ID' 1 completes a new report on 02/06/2023, the field will change from 01/06/2023 to 02/06/2023 when I next feed the data in on 02/06/2023. I can set up the SSIS package to inject data daily to capture any changes

 

Client_IDReport_Completion_Date
101/06/2023
215/06/2023

 

I would like to capture any changes in the Report_Completion_Date field for any Client_ID's.

 

My ideal output table will show the Client_ID and any or all Report_Completion_Date, unsure if it is best/possible to show the different Report_Completion_Date as additional columns if there is new changed data for Client_ID, for example:

Example for new row everytime there is a new 'Report_Completion_Date'

Client_IDReport_Completion_Date
101/06/2023
102/06/2023
215/06/2023

Example for new column everytime there is a new 'Report_Completion_Date'

Client_IDReport_Completion_DateReport_Completion_Date_2
101/06/202302/06/2023
215/06/2023Blank/Null

 

Thanks so much for your help

Resources