
February 23rd, 2008, 01:28 AM
|
|
Registered User
|
|
Join Date: Jan 2008
Posts: 8
Time spent in forums: 1 h 14 m 9 sec
Reputation Power: 0
|
|
|
ASP 1.0 - Database query help
I have a script I am working on to pull employee info from a database. This is my problem. In the database there are certain status codes in the 'status_code' column and a date timestamp in the 'dts' column, as well there is an employee number in the emp_id' column. I am having trouble pulling these status codes in a certain order. What I need to do is find a status code "OS" Which shows the employee starting a job. I need to grab that date time stamp and look for the next status code that ISN"T
"OS" but for this example lets say "DL" -So when looping through the records , I have to find the first "OS", skip any other OS's until I find any other code, then I need to find the next OS. sort of in the order ,OS, DL, OS,DL Once I get the timestamps from each status code entry I need to find out how much time the employee took to go from OS to DL (by using the date time stamps and I guess subtracting one from the other,, adding them up until I get a total for the day/
I can figure the time issue out but it is getting the timestamps from the status codes in the order above. HELP@@
thanks in advance
|