STOCKDETAIL (4.0SP4)

Stores stock detail information for a revenue records with a payment type of Stock

Primary Key
Primary Key Field Type

ID

uniqueidentifier

Foreign Key Fields
Foreign Key Field Type Null Notes Description

ADDEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

CHANGEDBYID

uniqueidentifier

false

FK to CHANGEAGENT.

BASECURRENCYID

uniqueidentifier

true

The base currency associated with this record.

ORGANIZATIONEXCHANGERATEID

uniqueidentifier

true

The exchange rate used to calculate the organization amount.

TRANSACTIONCURRENCYID

uniqueidentifier

true

The transaction currency associated with this record.

BASEEXCHANGERATEID

uniqueidentifier

true

The exchange rate used to calculate the base amount.

Fields
Field Field Type Null Notes Description

ISSUER

nvarchar(100)

false

''

The issuer of the stock.

MEDIANPRICE

decimal(19, 4)

false

0

The median price of the stock.

NUMBEROFUNITS

decimal(20, 3)

false

0

The number of units of stock issued.

SYMBOL

nvarchar(25)

false

''

The Symbol for the stock.

DATEADDED

datetime

false

getdate()

Indicates the date this record was added.

DATECHANGED

datetime

false

getdate()

Indicates the date this record was last changed.

TS

timestamp

false

Timestamp.

TSLONG

bigint (Computed)

true

Numeric representation of the timestamp.

LOWPRICE

decimal(19, 4)

false

0

The low price the stock sold for.

HIGHPRICE

decimal(19, 4)

false

0

The high price the stock sold for.

ORGANIZATIONMEDIANPRICE

decimal(19, 4)

false

0

The median price of the stock in the organization currency.

ORGANIZATIONLOWPRICE

decimal(19, 4)

false

0

The low price the stock sold for in the organization currency.

ORGANIZATIONHIGHPRICE

decimal(19, 4)

false

0

The high price the stock sold for in the organization currency.

TRANSACTIONMEDIANPRICE

decimal(19, 4)

false

0

The median price of the stock in the transaction currency.

TRANSACTIONLOWPRICE

decimal(19, 4)

false

0

The low price the stock sold for in the transaction currency.

TRANSACTIONHIGHPRICE

decimal(19, 4)

false

0

The high price the stock sold for in the transaction currency.

Indexes
Index Name Field(s) Unique Primary Clustered

IX_STOCKDETAIL_BASECURRENCYID

BASECURRENCYID

False

False

False

IX_STOCKDETAIL_BASEEXCHANGERATEID

BASEEXCHANGERATEID

False

False

False

IX_STOCKDETAIL_DATEADDED

DATEADDED

False

False

True

IX_STOCKDETAIL_DATECHANGED

DATECHANGED

False

False

False

IX_STOCKDETAIL_ORGANIZATIONEXCHANGERATEID

ORGANIZATIONEXCHANGERATEID

False

False

False

IX_STOCKDETAIL_TRANSACTIONCURRENCYID

TRANSACTIONCURRENCYID

False

False

False

PK_STOCKDETAIL

ID

True

True

False

Triggers
Trigger Name Description

TR_STOCKDETAIL_AUDIT_UPDATE

TR_STOCKDETAIL_AUDIT_DELETE

TR_STOCKDETAIL_INSERTUPDATE_CURRENCY

Referenced by
Referenced by Field

STOCKSALE_EXT

STOCKDETAILID