Database SQL Operation: Position.countByUser
Description: | Count to check if the user holds the position. |
Sterotype: | ns |
SELECT
COUNT (*)
INTO
:numberOfRecords
FROM
Users
WHERE Users.userName = :userName
AND Users.userName IN
(
SELECT
Users.userName
FROM
Users,
PositionHolderLink
WHERE PositionHolderLink.organisationStructureID = :organisationStructureID
AND PositionHolderLink.positionID = :positionID
AND Users.userName = PositionHolderLink.userName
AND PositionHolderLink.recordStatus = :recordStatus
)
|