tables · table
empcode
The empcode table serves as a reference or lookup table within the ERP system, specifically mapping company codes (compcode) to specific employee categories, personnel names, or location-based designations (emptype). Despite the table name, the sample data indicates that emptype often contains specific individual names (e.g., "KAMAL KHANNA") or functional areas (e.g., "SHED-2", "LIFTER"), suggesting it is used to categorize personnel or work centers for reporting and HR modules.
Row count
48
Last entry
—
Source
tables
Columns
3| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | No | Internal unique identifier/Primary Key. |
compcode | string | No | Unique identifier for the company/branch. |
emptype | string | No | The name, designation, or category of the employee/resource. |
Full documentation
### 1. Overview The `empcode` table serves as a reference or lookup table within the ERP system, specifically mapping company codes (`compcode`) to specific employee categories, personnel names, or location-based designations (`emptype`). Despite the table name, the sample data indicates that `emptype` often contains specific individual names (e.g., "KAMAL KHANNA") or functional areas (e.g., "SHED-2", "LIFTER"), suggesting it is used to categorize personnel or work centers for reporting and HR modules. ### 2. Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | No | Internal unique identifier/Primary Key. | 0, 1, 2... | `PRIMARY KEY` | | **compcode** | string | No | Unique identifier for the company/branch. | "DAS" | `JOIN`, `WHERE` | | **emptype** | string | No | The name, designation, or category of the employee/resource. | "NAVEEN", "SHED-1", "LIFTER" | `JOIN`, `GROUP BY` | ### 3. Relationships & Join Map The `empcode` table primarily acts as a descriptor table. Based on the `SCHEMA_MAP`, it relates to other HR and master tables as follows: #### Primary Joins * **empmas**: The most direct relationship. Joins on `compcode` and `emptype` to filter or categorize the main employee master list. * `empcode.compcode = empmas.compcode` * `empcode.emptype = empmas.emptype` #### Common Joins (System-wide) Due to the prevalence of `compcode`, this table can be filtered alongside transactional data, though it lacks a specific `empcode` (ID) column, relying instead on the `emptype` string. * **attandence**: Likely joined on `compcode` to filter attendance records by company. * **empmas**: Joined to retrieve detailed profile information for the names listed in `emptype`. #### Join Rules Note * **No `empcode` ID**: Note that this table contains a column named `emptype` but does **not** contain a numeric or alphanumeric `empcode` column (despite the table name). Joins with other tables like `attandence` must be done via `compcode` or through `empmas` as an intermediary.