We have a really stupid data requirement for dates in our database. The month, day, year, minute, & hour are stored in separate columns. Obviously, this is not ideal for querying date ranges especially using Entity Framework.
We decided to just create a new column called combinedDate that is a SQL smalldatetime with the correlating date info. While trying to update our db, our application just freezes and never completes the update. Our test db only has 8400 rows so this definitely shouldn't be a big problem.
Should we be using a stored procedure for this? What is the best approach to accomplish this?
We will have to do this to our date data for every new entry in the database. These entries could possibly happen 8400 rows at a time.
Column formats:
Year int= 12Month int= 4Day int= 27Hour int= 12Min int= 0
New column: smalldatetime
combinedDate = '2012-04-27 12:00:00 PM'