tables · table
cpotextamnd
The cpotextamnd table serves as a historical repository for descriptive text or special instructions associated with Central Purchase Order (CPO) amendments. While the base PO text is typically stored in cpotext, this table captures the state of those details at each specific amendment level (amendno). It is a secondary detail table linked to the CPO amendment header.
Row count
290
Last entry
—
Source
tables
Columns
6| Column | Type | Nullable | Meaning |
|---|---|---|---|
index | integer | NO | Primary Key; internal row identifier. |
compcode | string | NO | Company identifier code. |
pono | integer | NO | Purchase Order Number. |
amendno | integer | NO | The specific amendment version number. |
cpodetail | string | YES | The actual long-form text or comments for the PO. |
invyear | integer | NO | The inventory or financial year associated with the PO. |
Full documentation
### 1) Overview The `cpotextamnd` table serves as a historical repository for descriptive text or special instructions associated with **Central Purchase Order (CPO) amendments**. While the base PO text is typically stored in `cpotext`, this table captures the state of those details at each specific amendment level (`amendno`). It is a secondary detail table linked to the CPO amendment header. ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **index** | integer | NO | Primary Key; internal row identifier. | 0, 1, 2... | `PK` | | **compcode** | string | NO | Company identifier code. | e.g., "DAS" | `JOIN`, `WHERE` | | **pono** | integer | NO | Purchase Order Number. | e.g., 118, 80 | `JOIN`, `WHERE` | | **amendno** | integer | NO | The specific amendment version number. | 0 = Initial, 1+ = Revisions | `JOIN`, `WHERE` | | **cpodetail** | string | YES | The actual long-form text or comments for the PO. | Text strings | `SELECT` | | **invyear** | integer | NO | The inventory or financial year associated with the PO. | e.g., 2014, 2015 | `JOIN`, `WHERE` | ### 3) Relationships & Join Map #### Logical Parents * **dbo.cpohdramnd**: The primary header for PO amendments. Join on `compcode`, `pono`, `amendno`, and `invyear` to get general amendment info (reasons, dates). * **dbo.cpohdr**: The original PO header. Join on `compcode`, `pono`, and `invyear` to see the current status of the root document. #### Logical Siblings * **dbo.cpodtlamnd**: Stores the line-item amendments (quantities, rates). Join on `compcode`, `pono`, `amendno`, and `invyear`. * **dbo.cpotext**: The current/base text for the PO. Join on `compcode`, `pono`, and `invyear`. #### Join Example (SQL Server) ```sql SELECT h.pono, h.amendno, h.amenddate, t.cpodetail FROM dbo.cpohdramnd h INNER JOIN dbo.cpotextamnd t ON h.compcode = t.compcode AND h.pono = t.pono AND h.amendno = t.amendno AND h.invyear = t.invyear WHERE h.pono = 80; ```