Skip to content

Commit fb82385

Browse files
Merge pull request microsoft#341 from JocaPC/master
Corrected error in FLGP Xevent samples
2 parents 9978262 + 9242ae3 commit fb82385

6 files changed

Lines changed: 56 additions & 1 deletion

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
CREATE VIEW Website.PurchaseOrderLines
3+
AS
4+
SELECT ol.PurchaseOrderLineID, ol.PurchaseOrderID, ol.Description, ol.IsOrderLineFinalized,
5+
ProductName = si.StockItemName, si.Brand, si.Size, c.ColorName, pt.PackageTypeName
6+
FROM Purchasing.PurchaseOrderLines ol
7+
INNER JOIN Warehouse.StockItems si
8+
ON ol.StockItemID = si.StockItemID
9+
INNER JOIN Warehouse.Colors c
10+
ON c.ColorID = si.ColorID
11+
INNER JOIN Warehouse.PackageTypes pt
12+
ON ol.PackageTypeID = pt.PackageTypeID
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
CREATE VIEW Website.PurchaseOrders
3+
AS
4+
SELECT o.PurchaseOrderID, o.OrderDate, o.ExpectedDeliveryDate, o.SupplierReference, o.IsOrderFinalized,
5+
dm.DeliveryMethodName, o.SupplierID,
6+
ContactName = c.FullName, ContactPhone = c.PhoneNumber, ContactFax = c.FaxNumber, ContactEmail = c.EmailAddress
7+
FROM Purchasing.PurchaseOrders o
8+
INNER JOIN Application.People c
9+
ON o.ContactPersonID = c.PersonID
10+
INNER JOIN Application.DeliveryMethods dm
11+
ON o.DeliveryMethodID = dm.DeliveryMethodID
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
CREATE VIEW Website.SalesOrderLines
3+
AS
4+
SELECT ol.OrderLineID, ol.OrderID, ol.Description, ol.Quantity, ol.UnitPrice, ol.TaxRate,
5+
ProductName = si.StockItemName, si.Brand, si.Size, c.ColorName, pt.PackageTypeName
6+
FROM Sales.OrderLines ol
7+
INNER JOIN Warehouse.StockItems si
8+
ON ol.StockItemID = si.StockItemID
9+
INNER JOIN Warehouse.Colors c
10+
ON c.ColorID = si.ColorID
11+
INNER JOIN Warehouse.PackageTypes pt
12+
ON ol.PackageTypeID = pt.PackageTypeID
13+
14+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
CREATE VIEW Website.SalesOrders
3+
AS
4+
SELECT o.OrderID, o.OrderDate, OrderNumber = o.CustomerPurchaseOrderNumber, o.ExpectedDeliveryDate,
5+
o.PickingCompletedWhen, o.DeliveryInstructions,
6+
o.CustomerID, c.CustomerName, c.PhoneNumber, c.FaxNumber, c.WebsiteURL,
7+
c.DeliveryAddressLine1, c.DeliveryAddressLine2, c.DeliveryPostalCode, c.DeliveryLocation,
8+
SalesPerson = sp.FullName, SalesPersonPhone = sp.PhoneNumber, SalesPersonEmail = sp.EmailAddress
9+
FROM Sales.Orders o
10+
INNER JOIN Sales.Customers c
11+
ON o.CustomerID = c.CustomerID
12+
INNER JOIN Application.People sp
13+
ON o.SalespersonPersonID = sp.PersonID
14+

samples/databases/wide-world-importers/wwi-ssdt/wwi-ssdt/WideWorldImporters.sqlproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,10 @@
694694
<Build Include="DataLoadSimulation\Stored Procedures\PopulateColdRoomTemperatures_temp.sql" />
695695
<Build Include="dbo\Tables\SampleVersion.sql" />
696696
<Build Include="Application\Stored Procedures\Configuration_PrepareForAzureStandard.sql" />
697+
<Build Include="Website\Views\PurchaseOrderLines.sql" />
698+
<Build Include="Website\Views\PurchaseOrders.sql" />
699+
<Build Include="Website\Views\SalesOrders.sql" />
700+
<Build Include="Website\Views\SalesOrderLines.sql" />
697701
</ItemGroup>
698702
<ItemGroup>
699703
<PostDeploy Include="PostDeploymentScripts\Script.PostDeployment1.sql" />

samples/features/automatic-tuning/force-last-good-plan/sql-scripts/init-wwi-db.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ CREATE EVENT SESSION [APC - plans that are not corrected] ON DATABASE
8080
ADD EVENT qds.automatic_tuning_plan_regression_detection_check_completed(
8181
WHERE ((([is_regression_detected]=(1))
8282
AND ([is_regression_corrected]=(0)))
83-
AND ([option_id]=(1))))
83+
AND ([option_id]=(0))))
8484
-- Use file target only on SQL Server 2017:
8585
-- ADD TARGET package0.event_file(SET filename=N'plans_that_are_not_corrected')
8686
ADD TARGET package0.ring_buffer (SET max_memory = 1000)

0 commit comments

Comments
 (0)