Skip to content

Instantly share code, notes, and snippets.

@Romiko
Created November 1, 2011 23:45
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 Romiko/1332297 to your computer and use it in GitHub Desktop.
Save Romiko/1332297 to your computer and use it in GitHub Desktop.
Sample SQLCE Script
;--EndBatch
;--EndBatch
CREATE TABLE [Clients](
[ExternalSystemName] [nvarchar](50) NOT NULL,
[ExternalSystemId] [nvarchar](50) NOT NULL,
[GivenName] [nvarchar](100) NOT NULL,
[MiddleNames] [nvarchar](200) NULL,
[FamilyName] [nvarchar](100) NOT NULL,
[PreferredName] [nvarchar](100) NULL,
[Gender] [nvarchar](10) NULL,
[DateOfBirth] [datetime] NULL,
[DateOfBirthCertainty] [nvarchar](15) NULL
)
;--EndBatch
INSERT [Clients] ([ExternalSystemName], [ExternalSystemId], [GivenName], [MiddleNames], [FamilyName], [PreferredName], [Gender], [DateOfBirth], [DateOfBirthCertainty]) VALUES (N'i-DoFS', N'000014', N'Romiko', N'Derbynew', N'Sharp', NULL, N'Male', CAST(0x0000964800000000 AS DateTime), N'Unconfirmed');--EndBatch
INSERT [Clients] ([ExternalSystemName], [ExternalSystemId], [GivenName], [MiddleNames], [FamilyName], [PreferredName], [Gender], [DateOfBirth], [DateOfBirthCertainty]) VALUES (N'i-DoFS', N'000001', N'Foo', NULL, N'Bar', NULL, N'Male', CAST(0x0000933500000000 AS DateTime), N'Unconfirmed');--EndBatch
INSERT [Clients] ([ExternalSystemName], [ExternalSystemId], [GivenName], [MiddleNames], [FamilyName], [PreferredName], [Gender], [DateOfBirth], [DateOfBirthCertainty]) VALUES (N'i-DoFS', N'000002', N'Baz', NULL, N'Top', NULL, N'Male', CAST(0x0000948600000000 AS DateTime), N'Unconfirmed');--EndBatch
INSERT [Clients] ([ExternalSystemName], [ExternalSystemId], [GivenName], [MiddleNames], [FamilyName], [PreferredName], [Gender], [DateOfBirth], [DateOfBirthCertainty]) VALUES (N'i-DoFS', N'000003', N'Tatham', NULL, N'Oddie', NULL, N'Male', CAST(0x0000966100000000 AS DateTime), N'Unconfirmed');--EndBatch
INSERT [Clients] ([ExternalSystemName], [ExternalSystemId], [GivenName], [MiddleNames], [FamilyName], [PreferredName], [Gender], [DateOfBirth], [DateOfBirthCertainty]) VALUES (N'i-DoFS', N'000004', N'Heather', NULL, N'Foo', NULL, N'Female', CAST(0x000093C400000000 AS DateTime), N'Unconfirmed');--EndBatch
;--EndBatch
;--EndBatch
CREATE TABLE [ReferenceData_DateCertainties](
[DateCertainty] [nvarchar](15) NOT NULL
)
;--EndBatch
INSERT [ReferenceData_DateCertainties] ([DateCertainty]) VALUES (N'Confirmed');--EndBatch
INSERT [ReferenceData_DateCertainties] ([DateCertainty]) VALUES (N'Estimated');--EndBatch
INSERT [ReferenceData_DateCertainties] ([DateCertainty]) VALUES (N'Unconfirmed')
;--EndBatch
;--EndBatch
CREATE TABLE [ReferenceData_Genders](
[Gender] [nvarchar](10) NOT NULL
)
;--EndBatch
INSERT [ReferenceData_Genders] ([Gender]) VALUES (N'Female');--EndBatch
INSERT [ReferenceData_Genders] ([Gender]) VALUES (N'Male');--EndBatch
INSERT [ReferenceData_Genders] ([Gender]) VALUES (N'Unknown')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment