I have the 2012 SQL SVR Mgmt Studio installed. I received a file--snippet below... from an export of our current DB provider, Advantage. I know I have to edit a lot of commands, but my question is quite simple--how do I use a text file with commands in it
like below to create tables, columns and load data into SQL SVR.
---data.txt file contents----
-- Table Type of Beneficiary is ADT
Create Table Beneficiary(
PlanId Char( 9 ),
Hash Integer,
Line1 Char( 128 ),
Line2 Char( 128 ),
Batch Char( 16 ) );
EXECUTE PROCEDURE sp_CreateIndex90( 'Beneficiary', 'LAC_LACV1_Beneficiary.adi', 'KEY1', 'Hash;PlanId', '', 2051, 4096, NULL );
INSERT INTO "Beneficiary" VALUES( 'LACV1', 983, 'Judith Pursifull~Spouse~100~~~', 'Michael Pursifull~Son~50~Thomas Pursifull~Son~50', '761011042' );
INSERT INTO "Beneficiary" VALUES( 'LACV1', 996, 'Anna Brownlow~Spouse~100~~~', 'Kaitlin Brownlow~Daughter~85~Lawanda Brownlow~Mother~15', '49036615' );
INSERT INTO "Beneficiary" VALUES( 'LACV1', 1005, 'Weldon Shelton~Other~50~Star Shelton~Other~50', 'Danica Shelton~Sister~50~Ryan Shelton~brother~50', '109075816' );
INSERT INTO "Beneficiary" VALUES( 'LACV1', 1031, 'Donald D Duffy~Spouse~100~~~', 'Brandon M Duffy~Son~100~~~', '219979254' );
INSERT INTO "Beneficiary" VALUES( 'LACV1', 1063, 'Lynne Roffino~Other~50~John Roffino~Other~50', 'Katy Roffino~Sister~50~Margaret Roffino~Sister~50', '604232358' );
INSERT INTO "Beneficiary" VALUES( 'LACV1', 1062, 'John Teaven Redstone~Spouse~100~~~', '~~~~~', '482024691' );
INSERT INTO "Beneficiary" VALUES( 'LACV1', 1032, 'Judith Anne Brown (for cat care)~Other~50~Judith Ann (Kappler) Barklage~Other~50', 'LaVerne Cocke (for cat care)~Friend-PantegoBibl~50~~~', '358324107' );
-- Table Type of Date is ADT
Create Table Date(
Hash Integer,
PlanId Char( 9 ),
Type Char( 24 ),
Date Date,
Override Logical,
Batch Char( 32 ) );
EXECUTE PROCEDURE sp_CreateIndex90( 'Date', 'LAC_LACV1_Date.adi', 'KEY1', 'Hash;Date;PlanId;Type', '', 2051, 4096, NULL );
INSERT INTO "Date" VALUES( 1018, 'LACV1', 'HARDSHIPEND', '2010-02-20', False, '20090820-9414719' );
INSERT INTO "Date" VALUES( 1018, 'LACV1', 'HARDSHIPSTART', '2009-08-20', False, '20090820-9414719' );
INSERT INTO "Date" VALUES( 1001, 'LACV1', 'HARDSHIPEND', '2010-02-06', False, '20090806-9371968' );
INSERT INTO "Date" VALUES( 1001, 'LACV1', 'HARDSHIPSTART', '2009-08-06', False, '20090806-9371968' );
INSERT INTO "Date" VALUES( 1022, 'LACV1', 'LUMPSUMDISTRIBUTION', '2009-07-21', False, '20090721-9337640' );
charles.leggette