Morpheus7
asked on
Specify timing interval fro change data
Hi experts,
I am currently using the code below to specify a time period for retrieving data for an incremental load of a data warehouse. I have manage to get this to specify a 24 hour period. I would like to be able to specify an period of 1 hour as opposed to 1 day. My current code is:
SELECT DATEADD(dd,0, DATEDIFF(dd,0,GETDATE()-1) ) AS ExtractStartTime,
DATEADD(dd,0, DATEDIFF(dd,0,GETDATE())) AS ExtractEndTime
Many thanks
I am currently using the code below to specify a time period for retrieving data for an incremental load of a data warehouse. I have manage to get this to specify a 24 hour period. I would like to be able to specify an period of 1 hour as opposed to 1 day. My current code is:
SELECT DATEADD(dd,0, DATEDIFF(dd,0,GETDATE()-1)
DATEADD(dd,0, DATEDIFF(dd,0,GETDATE())) AS ExtractEndTime
Many thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER