SQL-023: Employee retrieval (adp / virtual variant)*
This document describes SQL-023, the employee retrieval (adp / virtual variant)* statement or call used by SAIF.Business.
Classification
Field
Value
SQL ID
SQL-023
Operation type
Read
Execution method
Inline
Database
Oracle
Schema
[unqualified]**
Command type
Text
Business object
clsEmployeeData
Criteria property
RetrieveSQL
Lifecycle method
BeforeRetrieve
Parameters
Parameter
Direction
Type
Max length
Description
:ID
Input
String
10-11
Employee id or user id, depending on criteria branch
Tables
Table
Access
Columns used
ADP_EMPLOYEE
SELECT
See sample SQL and source implementation.
VIRTUAL_EMPLOYEE
SELECT
See sample SQL and source implementation.
Sample SQL
SELECT ADP . CITY AS City , ADP . DEPTID AS Deptid , ADP . DESCR AS Descr , ADP . EMAIL_ADDRESS AS EmailAddress ,
ADP . EMPLID AS Emplid , ADP . EMPL_STATUS AS EmplStatus , ADP . FIRST_NAME AS FirstName ,
ADP . LAST_NAME AS LastName , ADP . LOCATION AS Location , ADP . MIDDLE_NAME AS MiddleName ,
ADP . PHONE AS Phone , ADP . PHONE_EXTENSION AS PhoneExtension , ADP . PREFERRED_NAME AS PreferredName ,
ADP . REPORTS_TO AS ReportsTO , SPV . USER_ID AS RptMgrMailid , ADP . RPT_MGR AS RptMgr ,
ADP . RPT_MGR_EMPLID AS RptMgrEmplid , ADP . STATE AS State , ADP . STREET1 AS Street1 ,
ADP . USER2 AS User2 , ADP . USER_ID AS UserID , ADP . ZIP AS Zip , ADP . desk_location_name AS DeskLocationName
FROM ADP_EMPLOYEE ADP
LEFT JOIN ADP_EMPLOYEE SPV ON SPV . EMPLID = ADP . RPT_MGR_EMPLID
WHERE ADP . EMPLID = : ID
Virtual variant starts from VIRTUAL_EMPLOYEE ADP, ADP_EMPLOYEE SPV and appends SPV.EMPLID (+) = ADP.RPT_MGR_EMPLID.
Operations and processes
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Sources
Business\SAIF.Business\clsEmployeeData.vb