Skip to content

Commit c4061a3

Browse files
committed
Added quoted identifier_on in insert customer/supplier transactions and missing columns in purchase order lines view.
1 parent 7ea805e commit c4061a3

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

samples/databases/wide-world-importers/wwi-ssdt/wwi-ssdt/WebApi/Stored Procedures/UpdateCustomerTransactionFromJson.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
CREATE PROCEDURE [WebApi].[UpdateCustomerTransactionFromJson](@CustomerTransaction NVARCHAR(MAX), @CustomerTransactionID int, @UserID int)
22
WITH EXECUTE AS OWNER
33
AS BEGIN
4+
SET QUOTED_IDENTIFIER ON;
45
UPDATE Sales.CustomerTransactions SET
56
TransactionTypeID = ISNULL(json.TransactionTypeID, Sales.CustomerTransactions.TransactionTypeID),
67
PaymentMethodID = ISNULL(json.PaymentMethodID, Sales.CustomerTransactions.PaymentMethodID),

samples/databases/wide-world-importers/wwi-ssdt/wwi-ssdt/WebApi/Stored Procedures/UpdateSupplierTransactionFromJson.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
CREATE PROCEDURE [WebApi].[UpdateSupplierTransactionFromJson](@SupplierTransaction NVARCHAR(MAX), @SupplierTransactionID int, @UserID int)
22
WITH EXECUTE AS OWNER
33
AS BEGIN
4+
SET QUOTED_IDENTIFIER ON;
45
UPDATE Purchasing.SupplierTransactions SET
56
SupplierID = ISNULL(json.SupplierID,Purchasing.SupplierTransactions.SupplierID),
67
TransactionTypeID = ISNULL(json.TransactionTypeID,Purchasing.SupplierTransactions.TransactionTypeID),

samples/databases/wide-world-importers/wwi-ssdt/wwi-ssdt/WebApi/Views/PurchaseOrderLines.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
CREATE VIEW [WebApi].[PurchaseOrderLines]
22
AS
3-
SELECT ol.PurchaseOrderLineID, ol.PurchaseOrderID, ol.Description, ol.IsOrderLineFinalized,
4-
ProductName = si.StockItemName, si.Brand, si.Size, c.ColorName, pt.PackageTypeName
3+
SELECT ol.PurchaseOrderLineID, ol.PurchaseOrderID, ol.Description, ol.IsOrderLineFinalized,
4+
ProductName = si.StockItemName, si.Brand, si.Size, c.ColorName, pt.PackageTypeName,
5+
ol.ReceivedOuters, ol.OrderedOuters, ol.ExpectedUnitPricePerOuter
56
FROM Purchasing.PurchaseOrderLines ol
67
INNER JOIN Warehouse.StockItems si
78
ON ol.StockItemID = si.StockItemID

0 commit comments

Comments
 (0)