SQL Server csv in xml out Project Part 9


Part 9

DECLARE @OrderNumber VARCHAR(5);
SELECT @OrderNumber = OrderNumber FROM [dbo].[01HeaderBulkInsert];

-- Copy from the two "insert" tables to three tables.
INSERT INTO Suppliers (FullSupplierName, SupplierCode)
SELECT FullSupplierName, SupplierCode
FROM [dbo].[01HeaderBulkInsert]

INSERT INTO Orders(SupplierCode, OrderNumber,CSVDatetime)
SELECT SupplierCode, OrderNumber, DateAndTime
FROM [dbo].[01HeaderBulkInsert]

INSERT INTO Books (OrderNumber, BookTitle, ISBN, Authors, Quantity, UnitPrice)
SELECT @OrderNumber, BookTitle, ISBN, Authors, Quantity, UnitPrice
FROM [dbo].[02DetailBulkInsert]
Series Navigation<< SQL Server csv in xml out Project Part 8SQL Server csv in xml out Project Part 10 >>

Leave a comment

Your email address will not be published. Required fields are marked *