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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

processing data with startdate and enddate

Status
Not open for further replies.

blom0344

Technical User
Mar 20, 2002
3,441
NL
I am trying to process data coming from an absence database. Basically the only input is a file with 3 fields: Employeenumber,startdate, enddate.

The requirement is to calculate somehow:

1. The number of days between the the dates (easy)
2. The number of days for each month, generating a child record for each month with the number of days, like:

Input:

TBL 11-19-2003 01-26-2004

Output:

Master-record:

TBL 11-19-2003 69

Children:

TBL 11-19-2003 2003 NOV 12
TBL 11-19-2003 2003 DEC 31
TBL 11-19-2003 2004 JAN 26

I do not see a solution with just SQL , but would a stored prodecure be able to handle such (seeming simple) problem?

T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top