====== pears.CompanySalesStatus ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Look-up of sales statuses for Company
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **CompanySalesStatusID** | char(20) | NOT NULL | | |
| Name | char(40) | NOT NULL | | |
| Sortorder | integer | NULL | | |
| AnalysisCode | char(50) | NOT NULL | | |
| ExcludeFromPipeline | tinyint | NOT NULL | 0 | |
| Defunct | tinyint | NOT NULL | 0 | |
| DivisionID | char(20) | NULL | | |
| Final | tinyint | NOT NULL | 0 | |
| DoNotShowRecords | tinyint | NOT NULL | 0 | |
===== Primary Key =====
* CompanySalesStatusID
===== Foreign Keys =====
* No outgoing foreign keys found.
===== Referenced By =====
^ Table ^ Constraint ^ Columns ^ Referenced columns ^
| [[database:tables:pears_company|pears.Company]] | CompanySalesStatus | CompanySalesStatusID | CompanySalesStatusID |
===== Indexes =====
* No indexes found.
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."CompanySalesStatus"
-- Table comment: Look-up of sales statuses for Company
-- Statement count: 2
CREATE TABLE "pears"."CompanySalesStatus" (
"CompanySalesStatusID" char(20) NOT NULL
,"Name" char(40) NOT NULL
,"Sortorder" integer NULL
,"AnalysisCode" char(50) NOT NULL
,"ExcludeFromPipeline" tinyint NOT NULL DEFAULT 0
,"Defunct" tinyint NOT NULL DEFAULT 0
,"DivisionID" char(20) NULL
,"Final" tinyint NOT NULL DEFAULT 0
,"DoNotShowRecords" tinyint NOT NULL DEFAULT 0
,PRIMARY KEY ("CompanySalesStatusID" ASC)
)
go
COMMENT ON TABLE "pears"."CompanySalesStatus" IS
'Look-up of sales statuses for Company'
go