SQL Server csv in xml out Project Part 9


This entry is part 9 of 13 in the series SQL CSV XML Project

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 >>