You are here: Re: Finding the natural key « MsSQL Server « IT news, forums, messages
Re: Finding the natural key

Posted by Erland Sommarskog on 10/01/52 11:42

pb648174 (google@webpaul.net) writes:
> A user is going to do some work on a particular day and then they are
> going to record the fact that they spent 30 minutes, 2 hours or
> whatever on a *particular schedule task* and want to report on it
> later. Are you saying I should turn the 30 minutes into a date range?
> The user won't specify that information - they will just know that on
> Tuesday they spent an hour working on schedule task 1 on Monday and two
> hours working on schedule task 2 on Tuesday.

Given that information, it seems reasonable to just have a counter,
suggestively in minutes. (Disclaimer: I did not read your original post
very closely.)

....however, it reminds me of our old time-reporting system we had my
office for several years, a hack developed by a colleague over a
Christmas holiday. Here you could enter start and stop for activities.
You didn't have to, and the only thing that mattered was was the hours
worked. But it was very user-friendly, since I didn't have to count
hours in my head, I could just write down how my day had been, easily
rearranging some hours if I wanted to save some typing.

> Oh yeah.. And why are your dates created as integers?

I suspect that was a type of Anith. Maybe he had hours or minutes
originally and then changed his mind.

In any case, there is a flaw with his date formats, remove the hyphens:
99991231 etc, to make sure that the dates are always interpreted the
same.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация