====== pears.IQacNominal ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Description ===== Nominal Code definitions and behaviour settings ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **NominalCode** | char(12) | NOT NULL | | | | NominalType | char(1) | NOT NULL | 'P' |

&L or S | | Name | char(50) | NOT NULL | | | | NominalGroup | char(12) | NOT NULL | | Used for P&L/BS report | | LedgerRelationship | char(30) | NOT NULL | | LedgerControl, AccountControl, AccountOptional, AccountRequired, NoAccount | | LedgerID | char(12) | NULL | | | | AccountCode | char(12) | NULL | | | ===== Primary Key ===== * NominalCode ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | NomLedger | LedgerID | [[database:tables:pears_iqacledger|pears.IQacLedger (LedgerID)]] | | | NomAccount | LedgerID, AccountCode | [[database:tables:pears_iqacaccount|pears.IQacAccount (LedgerID, AccountCode)]] | | ===== Referenced By ===== ^ Table ^ Constraint ^ Columns ^ Referenced columns ^ | [[database:tables:pears_iqacdocumenttemplate|pears.IQacDocumentTemplate]] | IQacNominal | VATNominalCode | NominalCode | | [[database:tables:pears_iqacjournal|pears.IQacJournal]] | IQacNominal | NominalCode | NominalCode | | [[database:tables:pears_iqacparams|pears.IQacParams]] | IQacNominal | ReserveNominalCode | NominalCode | ===== Indexes ===== ^ Name ^ Type ^ Columns ^ Detail ^ | IQacNom_Name | Unique index | Name | | ===== Triggers ===== * No triggers found. ===== Original SQL ===== -- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."IQacNominal" -- Table comment: Nominal Code definitions and behaviour settings -- Statement count: 8 CREATE TABLE "pears"."IQacNominal" ( "NominalCode" char(12) NOT NULL ,"NominalType" char(1) NOT NULL DEFAULT 'P' ,"Name" char(50) NOT NULL ,"NominalGroup" char(12) NOT NULL ,"LedgerRelationship" char(30) NOT NULL ,"LedgerID" char(12) NULL ,"AccountCode" char(12) NULL ,PRIMARY KEY ("NominalCode" ASC) ) go COMMENT ON COLUMN "pears"."IQacNominal"."NominalType" IS '

&L or S' go COMMENT ON COLUMN "pears"."IQacNominal"."NominalGroup" IS 'Used for P&L/BS report' go COMMENT ON COLUMN "pears"."IQacNominal"."LedgerRelationship" IS 'LedgerControl, AccountControl, AccountOptional, AccountRequired, NoAccount' go COMMENT ON TABLE "pears"."IQacNominal" IS 'Nominal Code definitions and behaviour settings' go ALTER TABLE "pears"."IQacNominal" ADD FOREIGN KEY "NomLedger" ("LedgerID" ASC) REFERENCES "pears"."IQacLedger" ("LedgerID") go ALTER TABLE "pears"."IQacNominal" ADD FOREIGN KEY "NomAccount" ("LedgerID" ASC,"AccountCode" ASC) REFERENCES "pears"."IQacAccount" ("LedgerID","AccountCode") go CREATE UNIQUE INDEX "IQacNom_Name" ON "pears"."IQacNominal" ( "Name" ) go