J
Jan T.
What is best practice? Either to
1) Register one record for each date or
2) Register one record with from and to date?
Let's look at an example. If I register vacation for several persons,
whould it then be enough to
register Personid, From- and ToDate?
Later I will want to use those data in a report that will show how
many employees had vacation
in June, or how many days where my Employees on vacation in, say,
June. I will have a parameter
to select wich period I want to study (i.e. June, July, August and so
on).
I have successfully made a sql that extract the information I want,
but it is rather complex so I
started wondering if I am doing things the wrong way when I have only
one record for each time
an employee is on a vacation.
This is how I have registered it:
Emplid Start End
100 6/1/08 6/10/08
122 6/14/08 6/20/08
100 6/28/08 7/4/08
Or should I rather do it this way?
Emplid VacDate
100 6/1/08
100 6/2/08
100 6/3/08
100 6/4/08
100 6/5/08
100 6/6/08
100 6/7/08
100 6/8/08
100 6/9/08
100 6/10/08
If the latter is the best, I am thinking of making some vba code that
adds all the record
with a loop only requiring the user to fill in from date and to date
and click OK.
SO, what is concider best practice here?
Appriciate very much your help.
1) Register one record for each date or
2) Register one record with from and to date?
Let's look at an example. If I register vacation for several persons,
whould it then be enough to
register Personid, From- and ToDate?
Later I will want to use those data in a report that will show how
many employees had vacation
in June, or how many days where my Employees on vacation in, say,
June. I will have a parameter
to select wich period I want to study (i.e. June, July, August and so
on).
I have successfully made a sql that extract the information I want,
but it is rather complex so I
started wondering if I am doing things the wrong way when I have only
one record for each time
an employee is on a vacation.
This is how I have registered it:
Emplid Start End
100 6/1/08 6/10/08
122 6/14/08 6/20/08
100 6/28/08 7/4/08
Or should I rather do it this way?
Emplid VacDate
100 6/1/08
100 6/2/08
100 6/3/08
100 6/4/08
100 6/5/08
100 6/6/08
100 6/7/08
100 6/8/08
100 6/9/08
100 6/10/08
If the latter is the best, I am thinking of making some vba code that
adds all the record
with a loop only requiring the user to fill in from date and to date
and click OK.
SO, what is concider best practice here?
Appriciate very much your help.