Skip to content

Instantly share code, notes, and snippets.

@j1n3l0
Created June 25, 2012 20:52
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 j1n3l0/2991150 to your computer and use it in GitHub Desktop.
Save j1n3l0/2991150 to your computer and use it in GitHub Desktop.
-- using SQLite3
-- create the table
CREATE TABLE census_data (
image_ref TEXT,
line_number INT,
forenames TEXT,
surname TEXT,
relationship TEXT
);
-- load the Tucker data
INSERT INTO census_data VALUES (12345,1,"Richard","Tucker","farther");
INSERT INTO census_data VALUES (12345,2,"Sarah Ann","Tucker","mother");
INSERT INTO census_data VALUES (12345,3,"Elizabeth Hannah",NULL,"daughter");
INSERT INTO census_data VALUES (12345,4,"Ellen Lewis",NULL,"daughter");
-- load the Smith data
INSERT INTO census_data VALUES (67890,1,"Richard","Smith","farther");
INSERT INTO census_data VALUES (67890,2,"Sarah Ann","Smith","mother");
INSERT INTO census_data VALUES (67890,3,"Elizabeth Hannah",NULL,"daughter");
INSERT INTO census_data VALUES (67890,4,"Ellen Lewis",NULL,"daughter");
-- I'm almost 100% sure you can fill in the missing surnames in pure
-- SQL, it just escapes my miniscule grey cells at the moment :(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment