Merge pull request #341 from JocaPC/master

Corrected error in FLGP Xevent samples
This commit is contained in:
Jovan Popovic (MSFT)
2017-12-14 22:35:42 +01:00
committed by GitHub
6 changed files with 56 additions and 1 deletions
@@ -0,0 +1,12 @@
CREATE VIEW Website.PurchaseOrderLines
AS
SELECT ol.PurchaseOrderLineID, ol.PurchaseOrderID, ol.Description, ol.IsOrderLineFinalized,
ProductName = si.StockItemName, si.Brand, si.Size, c.ColorName, pt.PackageTypeName
FROM Purchasing.PurchaseOrderLines ol
INNER JOIN Warehouse.StockItems si
ON ol.StockItemID = si.StockItemID
INNER JOIN Warehouse.Colors c
ON c.ColorID = si.ColorID
INNER JOIN Warehouse.PackageTypes pt
ON ol.PackageTypeID = pt.PackageTypeID
@@ -0,0 +1,11 @@
CREATE VIEW Website.PurchaseOrders
AS
SELECT o.PurchaseOrderID, o.OrderDate, o.ExpectedDeliveryDate, o.SupplierReference, o.IsOrderFinalized,
dm.DeliveryMethodName, o.SupplierID,
ContactName = c.FullName, ContactPhone = c.PhoneNumber, ContactFax = c.FaxNumber, ContactEmail = c.EmailAddress
FROM Purchasing.PurchaseOrders o
INNER JOIN Application.People c
ON o.ContactPersonID = c.PersonID
INNER JOIN Application.DeliveryMethods dm
ON o.DeliveryMethodID = dm.DeliveryMethodID
@@ -0,0 +1,14 @@
CREATE VIEW Website.SalesOrderLines
AS
SELECT ol.OrderLineID, ol.OrderID, ol.Description, ol.Quantity, ol.UnitPrice, ol.TaxRate,
ProductName = si.StockItemName, si.Brand, si.Size, c.ColorName, pt.PackageTypeName
FROM Sales.OrderLines ol
INNER JOIN Warehouse.StockItems si
ON ol.StockItemID = si.StockItemID
INNER JOIN Warehouse.Colors c
ON c.ColorID = si.ColorID
INNER JOIN Warehouse.PackageTypes pt
ON ol.PackageTypeID = pt.PackageTypeID
@@ -0,0 +1,14 @@
CREATE VIEW Website.SalesOrders
AS
SELECT o.OrderID, o.OrderDate, OrderNumber = o.CustomerPurchaseOrderNumber, o.ExpectedDeliveryDate,
o.PickingCompletedWhen, o.DeliveryInstructions,
o.CustomerID, c.CustomerName, c.PhoneNumber, c.FaxNumber, c.WebsiteURL,
c.DeliveryAddressLine1, c.DeliveryAddressLine2, c.DeliveryPostalCode, c.DeliveryLocation,
SalesPerson = sp.FullName, SalesPersonPhone = sp.PhoneNumber, SalesPersonEmail = sp.EmailAddress
FROM Sales.Orders o
INNER JOIN Sales.Customers c
ON o.CustomerID = c.CustomerID
INNER JOIN Application.People sp
ON o.SalespersonPersonID = sp.PersonID
@@ -694,6 +694,10 @@
<Build Include="DataLoadSimulation\Stored Procedures\PopulateColdRoomTemperatures_temp.sql" />
<Build Include="dbo\Tables\SampleVersion.sql" />
<Build Include="Application\Stored Procedures\Configuration_PrepareForAzureStandard.sql" />
<Build Include="Website\Views\PurchaseOrderLines.sql" />
<Build Include="Website\Views\PurchaseOrders.sql" />
<Build Include="Website\Views\SalesOrders.sql" />
<Build Include="Website\Views\SalesOrderLines.sql" />
</ItemGroup>
<ItemGroup>
<PostDeploy Include="PostDeploymentScripts\Script.PostDeployment1.sql" />
@@ -80,7 +80,7 @@ CREATE EVENT SESSION [APC - plans that are not corrected] ON DATABASE
ADD EVENT qds.automatic_tuning_plan_regression_detection_check_completed(
WHERE ((([is_regression_detected]=(1))
AND ([is_regression_corrected]=(0)))
AND ([option_id]=(1))))
AND ([option_id]=(0))))
-- Use file target only on SQL Server 2017:
-- ADD TARGET package0.event_file(SET filename=N'plans_that_are_not_corrected')
ADD TARGET package0.ring_buffer (SET max_memory = 1000)