Step 4(a): Create the SQL Server Table
Updated: November 21, 2013
In this step, you will create the Step 4: Create and Configure the SQL Server table in which the sales order will be inserted. The name of the table is OrderDetails. You can copy the script from here and run this to create the table. This script assumes that you already have an Orders database created.
To create the SQL Server table
Open SQL Server Management Studio and run the following query against the database where you want to create the table.
Run the following query to create the OrderDetails table:
USE [Orders] GO /****** Object: Table [dbo].[OrderDetails] Script Date: 04/02/2012 20:35:57 ******/ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[OrderDetails]') AND type in (N'U')) DROP TABLE [dbo].[OrderDetails] GO USE [Orders] GO /****** Object: Table [dbo].[OrderDetails] Script Date: 04/02/2012 20:35:57 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[OrderDetails]( [Id] [int] IDENTITY(1,1) NOT NULL, [OrderId] [varchar] (200), [QuantityOrdered] [int], [TotalAmount] [int] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO
Verify that the table is created in the target database.
Other ResourcesStep 4: Create and Configure the LOB Target
© 2013 Microsoft Corporation. All rights reserved.