I have this query
SELECT userID, swipedate, MIN(SwipeTime) AS Time2 ;
FROM temp WHERE VAL(swipetime) BETWEEN 1200 AND 1300 AND eventid='OUT' ;
GROUP BY userID, swipedate ;
INTO CURSOR c_LunchOut
There may be cases when an employee time-outs early, say 11:30.. leaving empty records on this query since I put the between 1200 and 1300 condition.. so I put another query on my form..
SELECT userID, swipedate, MAX(SwipeTime) AS Time2 ;
FROM temp WHERE eventid='OUT' AND VAL(swipetime) < 1200;
GROUP BY userID, swipedate ;
INTO CURSOR c_AMUndertime
I'd like to join these two tables with a condition that if TIME2 on c_LunchOut is empty, the record on c_AMUndertime will be used or saved in that table..
How should I do this?
Pls help. TIA.