hi i have a data set of the type below:
PrKey BioID DateTime CheckType CheckOut
1 1 15/12/08 09:00 I
2 1 15/12/08 17:00 O
3 2 15/12/08 08:00 I
4 2 15/12/08 16:00 O
5 1 12/12/08 21:45 I
6 1 13/12/08 02:19 I
7 1 13/12/08 02:19 I
8 1 13/12/08 02:25 I
9 1 13/12/08 02:31 I
10 1 13/12/08 03:12 I
11 1 13/12/08 03:14 I
12 1 13/12/08 06:15 I
13 1 13/12/08 07:05 I
14 1 13/12/08 08:05 I
15 1 13/12/08 08:06 I
16 1 13/12/08 15:40 I
17 1 13/12/08 15:55 I
18 1 13/12/08 16:11 I
19 1 13/12/08 16:15 I
20 1 13/12/08 16:15 I
21 1 13/12/08 16:16 I
and i want to loop through and insert in a table below
userid check in checkout
1 15/12/08 09:00 15/12/08 17:00
2 15/12/08 08:00 15/12/08 16:00
3 15/12/08 08:00
How can i achieve this? Check in corresponds to the value of I, Check Out corresponds to O.
Thank you.
0
Comments
2. In the Loop do following: if not Data found in "userid check in checkout" table for the UserID and Date -> create it (its the checkin), if found -> update it (its the check out)
3. Don't forgett the following situatuion: user doesn't check in or check out so you have not the ful Entry in the "userid check in checkout" table.
Regards
can you help me look into it and see where i am doing it wrongly?
"1 15/12/08 09:00 15/12/08 17:00". So you need to find the BIO Record for the BioID and " checkt"
is the table "checkinout" in the same database or is this a other database on the same server / different server.
Why i ask this? you can create a table in NAV (with same name and same fields) and set the property to LinkedObject (if you are under sql and not native).
if it is a SQL table or a SQL view (this u must before create). Then you doesn't need ADO and u handle all wit C/AL ;-)
Thanks.
I want an additional feature to check if the duration is more than one day then the previous time in should end at 23:59:59
and the remaining time be added to next day duration.
Any ideas how to achieve this.
Thanks.
I want an additional feature to check if the duration is more than one day then the previous time in should end at 23:59:59
and the remaining time be added to next day duration.
Any ideas how to achieve this.
Thanks.