Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dates and arrays and logic of it all

Status
Not open for further replies.

Steve688

IS-IT--Management
Oct 23, 2002
34
CA
I've been struggling with this one the past few days. Mostly, trying to find the best way to do it. I'll try to explain:
I have a table that can have multiple entries of the same member ID #. When multiple entries occur, there is a different FROM and TO date for every entry. There could also be a different status (married, single) and 'belong to branch' for each entry. I'm only interested in '05. So we could have something like this:

Code:
ID     | Status  |  Branch   |  From      |     To      | Duration
985097 | Single  | QC5       | 2005-05-05 | 2005-06-07  |   1
985097 | Double  | QC6       | 2005-01-01 | 2005-05-05  |   5
985097 | Double  | QC5       | 2005-06-07 | 2005-07-15  |   1

Out of these 3 entries (or 4, or 10) I need to start at the oldest entry look at the month span in this case 5 months, get the code to figure out that means January to May and then input the status and branch into another pre-existing table that has seperate fields for Jan through Dec. Populating Jan though May for that entry then moving onto the next - essentially tracking month to month status.

I hope I explained it well enough. I'm really stumped with this one.

Thanks,

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top