We Have a table of approval like below:
In above table we have ApprovalId
and ApprovalLevel
like first level approval and second level approval in ApprovalLevel
(For Approving Approval by its level).
I am trying to fetch record in query if specific user ApprovalLevel >= 1
then check its previous ApprovalStatus
if it Approved then show its record too.
I have tried many things but still not getting specify record.
In Simple term select record with User if only if its ApprovalLevel=1
or its previous ApprovalLevel
ApprovalStatus=1
.
Please help me on this: [IN this table ApprovalStatus: 0 = Pending and 1:Approved]