March 7, 2008 at 7:27 am
Thanks Lynn and pmohan for the code you posted. I took it pretty much as is, and have been able to create a view that makes it look for all the world like I'm actually storing the end date. I will probably spend the next two weeks actually deciphering the thought process behind pmohan's code. And Lynn, having the CTE logic will be very helpful once we move to a new version of SQL Server.
And Jeff, I was so intrigued by your comment about the normalized form including the storing the end date. To read discussions about normalization, I get the impression that everyone agrees what normalized is, they just don't agree on how normalized the data should be. I can see your point about not wanting to use one field to answer two questions, but I also keep coming back to the philosophy that a man with one watch always knows what time it is, a man with two is never sure.
Again, my thanks and appreciation for your assistance.
Mattie:)
March 7, 2008 at 7:46 am
Glad we could help, and thanks for the feedback.
😎
March 7, 2008 at 8:27 am
MattieNH (3/7/2008)
And Jeff, I was so intrigued by your comment about the normalized form including the storing the end date. To read discussions about normalization, I get the impression that everyone agrees what normalized is, they just don't agree on how normalized the data should be. I can see your point about not wanting to use one field to answer two questions, but I also keep coming back to the philosophy that a man with one watch always knows what time it is, a man with two is never sure.
Heh... ok... let me turn that around on you... isn't a column that serves two purposes like wearing two watches? 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
March 7, 2008 at 8:37 am
Depends on why you wear two watches. Soccer refs wear two watches out on the field (I do).
😎
March 7, 2008 at 9:31 am
Heh... ok... let me turn that around on you... isn't a column that serves two purposes like wearing two watches? 😉
Jeff,
I don't think so, but since I didn't think that storing the end date was normalized, that's not surprising.
In my years as a developer, I've always had users who wanted to store the same information in multiple forms or locations. And inevitably, data that should be the same gets out of sync. So while the man with one watch may not have any idea of what time it really is, he doesn't have to spend any effort figuring out which watch is right, and why the other watch is wrong.
Mattie
November 13, 2010 at 6:06 pm
MattieNH (3/7/2008)
Heh... ok... let me turn that around on you... isn't a column that serves two purposes like wearing two watches? 😉
Jeff,
I don't think so, but since I didn't think that storing the end date was normalized, that's not surprising.
In my years as a developer, I've always had users who wanted to store the same information in multiple forms or locations. And inevitably, data that should be the same gets out of sync. So while the man with one watch may not have any idea of what time it really is, he doesn't have to spend any effort figuring out which watch is right, and why the other watch is wrong.
Mattie
Heh... then I agree to disagree with you. In my eyes, a column with two purposes IS (to use your analogy) like a man wearing two watches.
--Jeff Moden
Change is inevitable... Change for the better is not.
December 6, 2010 at 9:59 pm
Please go with the enddate column in the table rather than calculating it separately. This is less pain to database and also it will give fast retrieval.
Viewing 7 posts - 16 through 21 (of 21 total)
You must be logged in to reply to this topic. Login to reply