INSERT INTO timecrunch.dbo.intervals (IntervalID, Duration)
SELECT ixInterval, DATEDIFF(hour, dtStart, dtEnd) FROM fogbugz.dbo.TimeInterval
WHERE dtEnd is not NULL
IntervalID is an int, Duration is a float
I am trying to put all the hourly durations into the Duration column… I assume that even if it is less than an hour it will use a fraction which is why I put a float?
Help.
PS: It’s running fine no errors, but after it’s done the intervals table is still empty… I know the data is in the TimeInterval table though…
I’m not sure why your data is not showing up, but DATEDIFF is not going to return a float. To get a float, you’ll probably want to use a smaller unit of time and divide by the number of your units per minute. Example: