Step 4 (On Premises): Create the SQL Server Table

As part of the business scenario, the message X12 sales order message sent by Contoso to Northwind must finally be inserted in a SalesOrder table, if the quantity ordered is greater than 100. This topic provides instructions on how to create the SalesOrder table within a SQL Server database instance that is housed on-premises.

To create the SalesOrder table

  1. Open SQL Server Management Studio and run the following query against the database where you want to create the table.

  2. Run the following query to create the SalesOrder table:

    CREATE TABLE [dbo].[SalesOrder] (  
        [SalesOrderID] int IDENTITY(1,1) NOT NULL,  
        [PartNum] int  NOT NULL,  
        [DateRequested] datetime  NULL,  
        [CompanyCode] varchar(3)  NOT NULL,  
        [Qty] int  NOT NULL,  
        [UnitAskPrice] float  NULL,  
        [ShipDate] datetime  NOT NULL,  
        [SellToAddress] varchar(255)  NULL,  
        [BillToAddress] varchar(255)  NOT NULL,  
        [PartnerContact] varchar(128)  NULL,  
        [CustomerComments] varchar(500)  NULL,  
        [RFQStatuesId] smallint  NULL  
    );  
    GO  
    
  3. Verify that the table is created in the target database.

See Also

Tutorial 4: Creating a Hybrid Application Using BizTalk Server 2013