-
Notifications
You must be signed in to change notification settings - Fork 0
/
insert_shp_data_into_brac_master.sql
45 lines (34 loc) · 2.95 KB
/
insert_shp_data_into_brac_master.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* insert_shp_data_into_brac_master.sql */
INSERT INTO BRAC_MASTER (ID, AREA, FAC_NAME, SBA_NAME, STATE, FAC_TYPE, CLOSURE, BRAC, BRANCH, STATE_FIPS, TBL_SHP_SOURCE, geom)
SELECT ID, AREA, FAC_NAME, SBA_NAME, ST_ABBR, FAC_TYPE, CLOSURE, BRAC, BRANCH, STFIPS, 'BRAC_12_30_15_SHP' AS TBL_SHP_SOURCE, geom
FROM BRAC_12_30_15_SHP;
INSERT INTO BRAC_MASTER (ID, AREA, FAC_NAME, STATE, FAC_TYPE, CLOSURE, BRAC, BRANCH, STATE_FIPS, TBL_SHP_SOURCE, geom)
SELECT ID, AREA, FAC_NAME, ST_ABBR, FAC_TYPE, CLOSURE, BRAC, BRANCH, STFIPS, 'BRAC_1_13_12_SHP' AS TBL_SHP_SOURCE, geom
FROM BRAC_1_13_12_SHP;
INSERT INTO BRAC_MASTER (ID, AREA, FAC_NAME, SBA_NAME, STATE, FAC_TYPE, CLOSURE, BRAC, BRANCH, STATE_FIPS, TBL_SHP_SOURCE, geom)
SELECT ID, AREA, FAC_NAME, SBA_NAME, ST_ABBR, FAC_TYPE, CLOSURE, BRAC, BRANCH, STFIPS, 'BRAC_1_16_14_SHP' AS TBL_SHP_SOURCE, geom
FROM BRAC_1_16_14_SHP;
INSERT INTO BRAC_MASTER (ID, AREA, FAC_NAME, STATE, FAC_TYPE, CLOSURE, BRAC, BRANCH, STATE_FIPS, TBL_SHP_SOURCE, geom)
SELECT ID, AREA, FAC_NAME, ST_ABBR, FAC_TYPE, CLOSURE, BRAC, BRANCH, STFIPS, 'BRAC_3_10_09_SHP' AS TBL_SHP_SOURCE, geom
FROM BRAC_3_10_09_SHP;
INSERT INTO BRAC_MASTER (ID, AREA, FAC_NAME, SBA_NAME, STATE, FAC_TYPE, CLOSURE, BRAC, BRANCH, STATE_FIPS, TBL_SHP_SOURCE, geom)
SELECT ID, AREA, FAC_NAME, SBA_NAME, ST_ABBR, FAC_TYPE, CLOSURE, BRAC, BRANCH, STFIPS, 'BRAC_3_30_15_SHP' AS TBL_SHP_SOURCE, geom
FROM BRAC_3_30_15_SHP;
INSERT INTO BRAC_MASTER (ID, AREA, FAC_NAME, STATE, FAC_TYPE, CLOSURE, BRAC, BRANCH, STATE_FIPS, TBL_SHP_SOURCE, geom)
SELECT ID, AREA, FAC_NAME, ST_ABBR, FAC_TYPE, CLOSURE, BRAC, BRANCH, STFIPS, 'BRAC_4_3_09_SHP' AS TBL_SHP_SOURCE, geom
FROM BRAC_4_3_09_SHP;
INSERT INTO BRAC_MASTER (ID, AREA, FAC_NAME, STATE, FAC_TYPE, CLOSURE, BRAC, STATE_FIPS, TBL_SHP_SOURCE, geom)
SELECT ID, AREA, NAME, STATE, TYPE, CLOSURE, BRAC, STATEFIPS, 'BRAC_5_11_06_SHP' AS TBL_SHP_SOURCE, geom
FROM BRAC_5_11_06_SHP;
INSERT INTO BRAC_MASTER (ID, AREA, FAC_NAME, SBA_NAME, STATE, FAC_TYPE, CLOSURE, BRAC, BRANCH, STATE_FIPS, TBL_SHP_SOURCE, geom)
SELECT ID, AREA, FAC_NAME, SBA_NAME, ST_ABBR, FAC_TYPE, CLOSURE, BRAC, BRANCH, STFIPS, 'BRAC_6_13_13_SHP' AS TBL_SHP_SOURCE, geom
FROM BRAC_6_13_13_SHP;
INSERT INTO BRAC_MASTER (ID, AREA, FAC_NAME, SBA_NAME, STATE, FAC_TYPE, CLOSURE, BRAC, BRANCH, STATE_FIPS, TBL_SHP_SOURCE, geom)
SELECT ID, AREA, FAC_NAME, SBA_NAME, ST_ABBR, FAC_TYPE, CLOSURE, BRAC, BRANCH, STFIPS, 'BRAC_8_12_14_SHP' AS TBL_SHP_SOURCE, geom
FROM BRAC_8_12_14_SHP;
INSERT INTO BRAC_MASTER (ID, AREA, FAC_NAME, STATE, FAC_TYPE, CLOSURE, BRAC, BRANCH, STATE_FIPS, TBL_SHP_SOURCE, geom)
SELECT ID, AREA, FAC_NAME, ST_ABBR, FAC_TYPE, CLOSURE, BRAC, BRANCH, STFIPS, 'BRAC_11_6_12_SHP' AS TBL_SHP_SOURCE, geom
FROM BRAC_11_6_12_SHP;
INSERT INTO BRAC_MASTER (ID, AREA, FAC_NAME, STATE, FAC_TYPE, CLOSURE, BRAC, BRANCH, STATE_FIPS, TBL_SHP_SOURCE, geom)
SELECT ID, AREA, FAC_NAME, ST_ABBR, FAC_TYPE, CLOSURE, BRAC, BRANCH, STFIPS, 'BRAC_11_30_12_SHP' AS TBL_SHP_SOURCE, geom
FROM BRAC_11_30_12_SHP;