Owner: | Sales |
Creation Date: | 04/26/2006 |
Located On: | PRIMARY |
Data Size KB: | 768 |
Index Size KB: | 400 |
Rows: | 13532 |
Description: | Currency exchange rates. |
Name | Data Type | Length | NULL | Default | IsIdentity | IsGUID | Description | ||
|
CurrencyRateID | int | 4 |
|
|
|
Primary key for CurrencyRate records. | ||
|
CurrencyRateDate | datetime | 8 |
|
|
|
Date and time the exchange rate was obtained. | ||
|
|
FromCurrencyCode | nchar | 3 |
|
|
|
Exchange rate was converted from this currency code. | |
|
|
ToCurrencyCode | nchar | 3 |
|
|
|
Exchange rate was converted to this currency code. | |
|
AverageRate | money | 8 |
|
|
|
Average exchange rate for the day. | ||
|
EndOfDayRate | money | 8 |
|
|
|
Final exchange rate for the day. | ||
|
ModifiedDate | datetime | 8 |
|
(getdate()) |
|
|
Date and time the record was last updated. |
Name | Seed | Increment | Not for replication | |
|
CurrencyRateID | 1 | 1 |
|
Index | Primary | Unique | Description | |
|
PK_CurrencyRate_CurrencyRateID |
|
|
Primary key (clustered) constraint |
|
AK_CurrencyRate_CurrencyRateDate_FromCurrencyCode_ToCurrencyCode |
|
|
Unique nonclustered index. |
Table | Foreign Key | Primary Key or Unique Constraint | |
|
Sales.SalesOrderHeader | FK_SalesOrderHeader_CurrencyRate_CurrencyRateID | PK_CurrencyRate_CurrencyRateID |
Table | Foreign Key | Primary Key or Unique Constraint | |
|
Sales.Currency | FK_CurrencyRate_Currency_FromCurrencyCode | PK_Currency_CurrencyCode |
|
Sales.Currency | FK_CurrencyRate_Currency_ToCurrencyCode | PK_Currency_CurrencyCode |
Objects that [Sales].[CurrencyRate] depends on
Object Name | Owner | Object Type | Dep Level | |
|
Name | dbo | User Defined type | 1 |
|
Currency | Sales | Table | 2 |
Objects that depend on [Sales].[CurrencyRate]
Object Name | Owner | Object Type | Dep Level | |
|
SalesOrderHeader | Sales | Table | 1 |
|
vSalesPersonSalesByFiscalYears | Sales | View | 2 |
|
SalesOrderDetail | Sales | Table | 2 |
|
SalesOrderHeaderSalesReason | Sales | Table | 2 |
|
uSalesOrderHeader | Sales | Trigger | 2 |
|
iduSalesOrderDetail | Sales | Trigger | 3 |
CREATE TABLE [CurrencyRate] (
[CurrencyRateID] [int] IDENTITY (1, 1) NOT NULL ,
[CurrencyRateDate] [datetime] NOT NULL ,
[FromCurrencyCode] [nchar] (3) COLLATE Latin1_General_CS_AS NOT NULL ,
[ToCurrencyCode] [nchar] (3) COLLATE Latin1_General_CS_AS NOT NULL ,
[AverageRate] [money] NOT NULL ,
[EndOfDayRate] [money] NOT NULL ,
[ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_CurrencyRate_ModifiedDate] DEFAULT (getdate()),
CONSTRAINT [PK_CurrencyRate_CurrencyRateID] PRIMARY KEY CLUSTERED
(
[CurrencyRateID]
) ON [PRIMARY] ,
CONSTRAINT [FK_CurrencyRate_Currency_FromCurrencyCode] FOREIGN KEY
(
[FromCurrencyCode]
) REFERENCES [Currency] (
[CurrencyCode]
),
CONSTRAINT [FK_CurrencyRate_Currency_ToCurrencyCode] FOREIGN KEY
(
[ToCurrencyCode]
) REFERENCES [Currency] (
[CurrencyCode]
)
) ON [PRIMARY]
GO
See Also
List of tables