HR.CURR_EMP (Current employees)
| Documentation | HR |
| Schema | HR |
| Name | CURR_EMP |
| Title | Current employees |
View that shows only current employees.
Columns
| Key | Name | Data type | Null | Attributes | References | Description | ||
|---|---|---|---|---|---|---|---|---|
| 1 | EMP_ID | int | Employee primary key | |||||
| Employee primary key |
||||||||
| 2 | EMP_NO | int | Employee unique number | |||||
| Employee unique number |
||||||||
| 3 | PER_ID | int | Person | |||||
| Person |
||||||||
| 4 | DEPT_ID | int | Department employee is assigned to | |||||
| Department employee is assigned to |
||||||||
| 5 | POS_TITLE | nvarchar(20) | Employee position tilte | |||||
| Employee position tilte |
||||||||
| 6 | FROM | date | Employment start date | |||||
| Employment start date |
||||||||
| 7 | TO | date | Employment end date or null | |||||
| Employment end date or null |
||||||||
| 8 | SALARY | numeric(18, 0) | Current salary | |||||
| Current salary |
||||||||
Relations
| Foreign table | Primary table | Join | Title / Name / Description | |
|---|---|---|---|---|
| HR.CURR_EMP (Current employees) | HR.PER (People) | User-defined relation |
||
|
Name: User-defined relation |
||||
Uses
| Name |
|---|
|
HR.CURR_EMP (Current employees)
|
Script
CREATE VIEW HR.[CURRENT_EMPLOYEES] AS SELECT EMP_ID, EMP_NO, PER_ID, DEPT_ID, POS_TITLE, [FROM], [TO], SALARY FROM HR.EMP WHERE ([FROM] <= GETDATE()) AND ([TO] >= GETDATE() OR [TO] IS NULL) |
Exported: 2019-02-04 23:17, Last imported: 2018-02-09 20:22
