tables · table
tempsalereportqty
The tempsalereportqty table serves as a temporary staging or reporting structure within the SQL Server database, specifically designed to aggregate and display sales quantity data. It consolidates information regarding customer orders, specific items (including part numbers), and logistics (transport and intermediaries). The data typically represents a snapshot of sales transactions over specific periods, likely used for generating end-user reports or dashboarding.
Row count
122
Last entry
2025-11-10
Source
tables
Columns
12| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | NO | Primary key/Row identifier |
compcode | string | YES | Company Code identifier |
custcode | string | YES | Customer Code |
itemcode | string | YES | Internal Item Identifier |
minvno | string | YES | Manual/Master Invoice Number |
invdate | datetime | YES | Date of the invoice |
modeqty | integer | YES | Quantity per packaging mode/batch |
totqty | integer | YES | Total Quantity |
transport | string | YES | Name of the transport service |
Through | string | YES | Intermediary or Agent |
ItemName | string | YES | Descriptive name of the product |
PartNO | string | YES | Technical Part Number |
Full documentation
### 1. Overview The `tempsalereportqty` table serves as a temporary staging or reporting structure within the SQL Server database, specifically designed to aggregate and display sales quantity data. It consolidates information regarding customer orders, specific items (including part numbers), and logistics (transport and intermediaries). The data typically represents a snapshot of sales transactions over specific periods, likely used for generating end-user reports or dashboarding. ### 2. Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | NO | Primary key/Row identifier | | Unique ID for each record. | | **compcode** | string | YES | Company Code identifier | e.g., "DAS" | Primary filter for multi-tenant data partitioning. | | **custcode** | string | YES | Customer Code | e.g., "BIL", "HML(D)" | Join key to `dbo.cust`. | | **itemcode** | string | YES | Internal Item Identifier | e.g., "BCBD0001" | Join key to `dbo.itemmas` or `dbo.saleitemmas`. | | **minvno** | string | YES | Manual/Master Invoice Number | e.g., "21482 - 21482" | Reference to physical invoice records. | | **invdate** | datetime | YES | Date of the invoice | | Used for time-series analysis and date filtering. | | **modeqty** | integer | YES | Quantity per packaging mode/batch | | Measures volume per transaction segment. | | **totqty** | integer | YES | Total Quantity | | Aggregated volume of items sold. | | **transport** | string | YES | Name of the transport service | | Logistics and shipping reference. | | **Through** | string | YES | Intermediary or Agent | | Used for tracking indirect sales or brokers. | | **ItemName** | string | YES | Descriptive name of the product | | Display field for reports. | | **PartNO** | string | YES | Technical Part Number | | Cross-reference with `dbo.saleitemmas`. | ### 3. Relationships & Join Map Based on the `SCHEMA_MAP`, the following joins are valid for extending the data in `tempsalereportqty`: #### Primary Joins * **dbo.cust**: Join via `compcode` and `custcode`. Used to retrieve full customer details, addresses, and tax identifiers. * **dbo.itemmas**: Join via `compcode` and `itemcode`. Used to fetch item attributes like weight, UOM, and product group. * **dbo.saleitemmas**: Join via `compcode` and `itemcode` (or `PartNO`). Authoritative for sales-specific item attributes. #### Likely Joins (Contextual) * **dbo.invhdr / dbo.invdtl**: Likely related via `compcode` and `custcode`/`itemcode`. Although `minvno` contains ranges in the sample data (e.g., "21482 - 21482"), it acts as a reference to the `invno` column in actual invoice tables. * **dbo.transptmas**: Join via `compcode` and matching `transport` name (Likely) or `tpcode` (if mapped) to fetch transport provider details.