====== pears.IQacCurrency ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Currencies used in sales ledger.
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **CurrencyCode** | char(3) | NOT NULL | | |
| Name | char(50) | NOT NULL | | |
| RatePerHome | double | NULL | | |
===== Primary Key =====
* CurrencyCode
===== Foreign Keys =====
* No outgoing foreign keys found.
===== Referenced By =====
^ Table ^ Constraint ^ Columns ^ Referenced columns ^
| [[database:tables:pears_iqaccountry|pears.IQacCountry]] | IQacCurrency | DefaultCurrencyCode | CurrencyCode |
| [[database:tables:pears_iqacdocument|pears.IQacDocument]] | IQacCurrency | CurrencyCode | CurrencyCode |
| [[database:tables:pears_iqacparams|pears.IQacParams]] | IQacCurrency | CurrencyCode | CurrencyCode |
===== Indexes =====
^ Name ^ Type ^ Columns ^ Detail ^
| IQacCurr_Name | Unique index | Name | |
===== Triggers =====
^ Name ^ Timing ^ Event ^
| WPK_iqaccurrency_CURRENCY | after | insert,delete,update order 1 |
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."IQacCurrency"
-- Table comment: Currencies used in sales ledger.
-- Statement count: 5
CREATE TABLE "pears"."IQacCurrency" (
"CurrencyCode" char(3) NOT NULL
,"Name" char(50) NOT NULL
,"RatePerHome" double NULL
,PRIMARY KEY ("CurrencyCode" ASC)
)
go
COMMENT ON TABLE "pears"."IQacCurrency" IS
'Currencies used in sales ledger.'
go
CREATE UNIQUE INDEX "IQacCurr_Name" ON "pears"."IQacCurrency"
( "Name" )
go
create trigger "WPK_iqaccurrency_CURRENCY" after insert,delete,update order 1 on
"pears"."iqaccurrency"
for each statement
begin
call "WPKTrackChange"('P','CURRENCY')
end
go
COMMENT TO PRESERVE FORMAT ON TRIGGER "pears"."IQacCurrency"."WPK_iqaccurrency_CURRENCY" IS
{create trigger WPK_iqaccurrency_CURRENCY
after insert,delete,update order 1 on
iqaccurrency
for each statement
begin
call WPKTrackChange('P','CURRENCY')
end
}
go