Skip to content

Commit adecca5

Browse files
committed
Updated data type of Quantity and Price
1 parent 2c65f6a commit adecca5

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

scripts/sql/CreateTablesOrders.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ CREATE TABLE [Data].[OrderRows](
1515
[OrderKey] [bigint] NOT NULL,
1616
[LineNumber] [int] NOT NULL,
1717
[ProductKey] [int] NOT NULL,
18-
[Quantity] [float] NOT NULL,
19-
[UnitPrice] [float] NOT NULL,
20-
[NetPrice] [float] NOT NULL,
21-
[UnitCost] [float] NOT NULL
18+
[Quantity] [int] NOT NULL,
19+
[UnitPrice] [money] NOT NULL,
20+
[NetPrice] [money] NOT NULL,
21+
[UnitCost] [money] NOT NULL
2222
CONSTRAINT [PK_OrderRows] PRIMARY KEY CLUSTERED ( [OrderKey] ASC, [LineNumber] ASC ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
2323
) ON [PRIMARY]
2424

scripts/sql/CreateTablesSales.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ CREATE TABLE [Data].[Sales](
88
[CustomerKey] [int] NOT NULL,
99
[StoreKey] [int] NOT NULL,
1010
[ProductKey] [int] NOT NULL,
11-
[Quantity] [float] NOT NULL,
12-
[UnitPrice] [float] NOT NULL,
13-
[NetPrice] [float] NOT NULL,
14-
[UnitCost] [float] NOT NULL,
11+
[Quantity] [int] NOT NULL,
12+
[UnitPrice] [money] NOT NULL,
13+
[NetPrice] [money] NOT NULL,
14+
[UnitCost] [money] NOT NULL,
1515
[CurrencyCode] [nvarchar](5) NOT NULL,
1616
[ExchangeRate] [float] NOT NULL,
1717
CONSTRAINT [PK_Sales] PRIMARY KEY CLUSTERED ( [OrderKey] ASC, [LineNumber] ASC ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]

0 commit comments

Comments
 (0)