By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,631 Members | 892 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,631 IT Pros & Developers. It's quick & easy.

Find Missing Data

P: n/a
I'm hopping someone can help me out on a payroll project I need to
implement.

To start we are dealing with payroll periods. So we are dealing with an
exact 10 days (Monday - Friday, 2 weeks).

I have a dataset as follows (1 week to keep it short):

Employee 1 - Date 1
Employee 1 - Date 2
Employee 1 - Date 3
Employee 1 - Date 4
Employee 1 - Date 5
Employee 2 - Date 1
Employee 2 - Date 3
Employee 2 - Date 4
Employee 2 - Date 5

You'll notice Employee 2 - Date 2 is missing. I need to develop a routine
that will give me all missed dates per employee.

I'm open to any ideas/theories. I have one of my own but before I get
started on it I wanted some opinions on it. I'm not sure how productive
such a routine will be. It sounds like a cluster f. to me.
Create an array of unique employee numbers

then

Loop
through that array and create a second array of unique dates. If the ubound
of that second array is < 9 then figure out missed date(s) (I have period
start). Dump employee number and date into a third array. Destroy second
array.
Next
Thoughts?
Jul 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I have no idea how the data is being stored really so I cannot say for sure
what he best method really is, but one good idea MIGHT be to keep a separate
data field for each employee number that contains a counter that gets
incremented each time a data record is added. That way all you have to do is
take one quick look at the counter fields to see if any of them are not at
the values that you want (the correct number of entries) and then start
looking for details per employee there.

Again, depending on how the data is stored this could be a app side
function, a trigger in the DB or maybe even code in a sproc on the DB side
of things.
"Justin Emlay" <NO***********@Maisto.com> wrote in message
news:Ob**************@TK2MSFTNGP11.phx.gbl...
I'm hopping someone can help me out on a payroll project I need to
implement.

To start we are dealing with payroll periods. So we are dealing with an
exact 10 days (Monday - Friday, 2 weeks).

I have a dataset as follows (1 week to keep it short):

Employee 1 - Date 1
Employee 1 - Date 2
Employee 1 - Date 3
Employee 1 - Date 4
Employee 1 - Date 5
Employee 2 - Date 1
Employee 2 - Date 3
Employee 2 - Date 4
Employee 2 - Date 5

You'll notice Employee 2 - Date 2 is missing. I need to develop a routine
that will give me all missed dates per employee.

I'm open to any ideas/theories. I have one of my own but before I get
started on it I wanted some opinions on it. I'm not sure how productive
such a routine will be. It sounds like a cluster f. to me.
Create an array of unique employee numbers

then

Loop
through that array and create a second array of unique dates. If the ubound of that second array is < 9 then figure out missed date(s) (I have period
start). Dump employee number and date into a third array. Destroy second
array.
Next
Thoughts?

Jul 21 '05 #2

P: n/a
Is your payroll data coming from a SQL data source? If so, I would really
recommend constructing a query that pulls out the missing data. I realise
this might not be possible in your situation, but if it is, I think it
will be the easiest way.

Cheers,

Richard.

Jul 21 '05 #3

P: n/a
Access Database

"Justin Emlay" <NO***********@Maisto.com> wrote in message
news:Ob**************@TK2MSFTNGP11.phx.gbl...
I'm hopping someone can help me out on a payroll project I need to
implement.

To start we are dealing with payroll periods. So we are dealing with an
exact 10 days (Monday - Friday, 2 weeks).

I have a dataset as follows (1 week to keep it short):

Employee 1 - Date 1
Employee 1 - Date 2
Employee 1 - Date 3
Employee 1 - Date 4
Employee 1 - Date 5
Employee 2 - Date 1
Employee 2 - Date 3
Employee 2 - Date 4
Employee 2 - Date 5

You'll notice Employee 2 - Date 2 is missing. I need to develop a routine
that will give me all missed dates per employee.

I'm open to any ideas/theories. I have one of my own but before I get
started on it I wanted some opinions on it. I'm not sure how productive
such a routine will be. It sounds like a cluster f. to me.
Create an array of unique employee numbers

then

Loop
through that array and create a second array of unique dates. If the ubound of that second array is < 9 then figure out missed date(s) (I have period
start). Dump employee number and date into a third array. Destroy second
array.
Next
Thoughts?

Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.