tables · table
vmachine
The vmachine table serves as a mapping entity that associates specific machines (mccode) with specific vendors (vendcode) within a company (compcode). It is primarily used in outsourced manufacturing or job-work scenarios where specific machinery capacities are allocated to or managed by external partners. The no_of_mac column indicates the quantity of a specific machine type assigned to the record.
Row count
3
Last entry
—
Source
tables
Columns
6| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | NO | Primary Key - internal row identifier. |
compcode | string | YES | Unique identifier for the company/branch. |
vendcode | string | YES | Unique code for the vendor or contractor managing the machine. |
mccode | string | YES | Physical machine identification code. |
no_of_mac | integer | YES | The quantity or count of machines allocated. |
username | string | YES | The system user who created or last updated the record. |
Full documentation
### 1. Overview The `vmachine` table serves as a mapping entity that associates specific machines (`mccode`) with specific vendors (`vendcode`) within a company (`compcode`). It is primarily used in outsourced manufacturing or job-work scenarios where specific machinery capacities are allocated to or managed by external partners. The `no_of_mac` column indicates the quantity of a specific machine type assigned to the record. ### 2. Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | NO | Primary Key - internal row identifier. | | `PK`, `ORDER BY` | | **compcode** | string | YES | Unique identifier for the company/branch. | e.g., "DAS" | `JOIN`, `WHERE` | | **vendcode** | string | YES | Unique code for the vendor or contractor managing the machine. | e.g., "BALAJI" | `JOIN`, `GROUP BY` | | **mccode** | string | YES | Physical machine identification code. | e.g., "CNC48" | `JOIN`, `FILTER` | | **no_of_mac** | integer | YES | The quantity or count of machines allocated. | e.g., 2 | `SUM`, `AVG` | | **username** | string | YES | The system user who created or last updated the record. | e.g., "system" | `AUDIT` | ### 3. Relationships & Join Map The `vmachine` table acts as a bridge between machine master data and vendor master data. #### Primary Joins (SCHEMA_MAP Verified): * **Machine Master**: Join `dbo.machine` ON `vmachine.compcode = machine.compcode` AND `vmachine.mccode = machine.mccode`. * **Vendor Master**: Join `dbo.vendmas` ON `vmachine.compcode = vendmas.compcode` AND `vmachine.vendcode = vendmas.vendcode`. * **Machine Operations**: Join `dbo.MachineOperation` ON `vmachine.compcode = MachineOperation.compcode` AND `vmachine.mccode = MachineOperation.mccode`. #### Likely Functional Joins (ERP Logic): * **Production Records**: Join `dbo.assemblyprodhdr` ON `vmachine.compcode = assemblyprodhdr.compcode` AND `vmachine.mccode = assemblyprodhdr.mccode`. * **Vendor Machine Operations**: Join `dbo.vitemopr` ON `vmachine.compcode = vitemopr.compcode` AND `vmachine.vendcode = vitemopr.vendcode`. * **Downtime Tracking**: Join `dbo.DownTime100HDR` ON `vmachine.compcode = DownTime100HDR.compcode` AND `vmachine.mccode = DownTime100HDR.mccode`.