Skip to content

Instantly share code, notes, and snippets.

@rellips
Created January 11, 2016 01:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rellips/0de6a3b9e0b97c9869f2 to your computer and use it in GitHub Desktop.
Save rellips/0de6a3b9e0b97c9869f2 to your computer and use it in GitHub Desktop.
-- Prep - Create a table for the 'mailing list'
--More info: http://jeffspiller.net/2016/01/moving-data-with-linked-databases.html
--Copyright 2016 Jeff Spiller. All rights reserved.
--Licensed under the MIT License -- License Details at https://opensource.org/licenses/MIT
USE [AdventureWorks2014]
GO
/****** Object: Table [dbo].[MailingListTable] Script Date: 1/3/2016 11:48:54 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MailingListTable](
[recID] [int] IDENTITY(1,1) NOT NULL,
[WebCustomerID] [int] NULL,
[AffiliateCustomerID] [int] NULL,
[Title] [nvarchar](8) NOT NULL,
[FirstName] [nvarchar](50) NOT NULL,
[MiddleName] [nvarchar](50) NOT NULL,
[LastName] [nvarchar](50) NOT NULL,
[Suffix] [nvarchar](10) NOT NULL,
[CompanyName] [nvarchar](128) NOT NULL,
[Email] [nvarchar](50) NOT NULL,
[Phone] [nvarchar](25) NOT NULL,
[AddressLine1] [nvarchar](60) NOT NULL,
[AddressLine2] [nvarchar](60) NOT NULL,
[City] [nvarchar](30) NOT NULL,
[StateProvince] [nvarchar](50) NOT NULL,
[PostalCode] [nvarchar](15) NOT NULL,
[Created] [datetime] NOT NULL,
[Modified] [datetime] NOT NULL,
[Source] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_MailingListTable] PRIMARY KEY CLUSTERED
(
[recID] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment