Hello!
I have two tables joined. Table1 and table2 the resulting table is describe below. I want to select all rows with shifttypeId = 1 and all rows with shifttypeID = 2 but only if the previousshiftID doesnt exist in a transaction where Shifttype ID = 1. For example. In the case below i only want to select transaction 1, 2, 3 but not transaction 4 because the previousShiftId exists in transaction 4.
Transaction, Operator, ShiftId, PreviousShiftId and ShiftypeID
1 23 1 - 1
2 23 3 2 2
3 23 4 - 1
4 23 5 4 2
Can u Help me? =) I Have no idea what to do, i have tried everything that i could think of..