This doesn't outline the courses that these people are taking. Based
upon your description of your problem client_id = 1289 doesn't fit the
bill.
Start course on January 9, 2006
End course on November 31 (30?), 2006
Start course January 9, 2006 (time between courses is negative)
End course on October 31, 2006
Cheers,
Jason Lepack
On May 29, 6:06 am, laurajayne.coz...@peterborough.gov.uk wrote:
Quote:
Hey, hope one of you can help wiht this!
>
I have a table that contains several different clients, each with
their own client_id. Each client has a start and end date as to when
their course starts with us and when it ends. Some clients have
multiple records with different dates where they have done different
courses. Example:
>
Client_Id Start_Date End Date
1234 01/09/2006 31/10/2006
1234 12/12/2006 01/02/2007
1234 09/02/2007 30/04/2007
1345 01/01/2007 01/03/2007
1289 01/09/2006 31/11/2006
1289 01/09/2006 31/10/2006
>
For those clients with multiple records I need to count the number of
day bewteen courses. So for client_id 1234 above, I need to know how
many days are between End_date of the first record and the start_date
of the second reocrd. Then I need to know how many days are betweent
he end_date of the second record and start_date of the third record
and so on and on...
>
This code needs to then repeat for all clients with multiple records -
BUT there is no limit on how many records a client may have.
>
I think I may need some kind of loop that assigns an auto number to
records but that resets itself on a change of client_id but i have no
idea how to do this! Help!
>
Laura