First go into Excel and browse to make sure there is no data copied into the snap date. If there is extra steps will be required and we have a Zoom Meeting with Chuck, dedicated to this topic (\\thepolice\support\_Support Recordings and notes\Deleting records from fact tables.mp4). Once the snap date on which you are going to copy is empty we can proceed to copy the data from the previous month.
- Open SQL Management Studio and connect to Databases.
- Find the snapdatekey of the day onto which we are going to copy the data using the following query:
- select (select [SnapDateKey] from dim_SnapDates where DateValue='04/01/2018')as [SnapDateKey]
- Change the date but be aware that for Irvine it will always be the first of the month.
- Repeat the same step to find the snapdatekey of the day from which you are getting the data. In this case it came from 03/01/2018.
- The query to copy the data can be found at Irvine D:\Datavision\SnapCopyScript.txt.
- Inside there is information on how to delete records from the fact tables and queries to copy data into the write tables, but for this task we are going to be using the very last query.
- The first snapdatekey will be the date to where we will be copying the data.

- The second at the bottom will be the date from where we are copying the data.

- After executing it finishes run this query to verify that some data was inserted in the snapdatekey:
- select dmk from factTargetGLDaySnap where SnapDateKey in(select SnapDateKey from dim_SnapDates where DateValue='4/1/2018')
- Change the date to the one you are copying to and run the query to make sure it has date on it.
- Go to Analysis Services and and full process the Target GL Day Snap cube, and that should be it.