# sql_statements_log

time_start: 2023-11-16T11:23:52.288Z
time_end: 2023-11-16T11:23:52.714Z
user_agent: spatialite_gui
error_cause: SQL error: table "MUNICIPIOS" already exists
sql_statement:
CREATE TABLE "MUNICIPIOS"(
  "PK_UID" INTEGER PRIMARY KEY AUTOINCREMENT,
  "C_PROVINCIA" INTEGER,
  "C_MUNICIPIO" INTEGER,
  "C_PROVMUN" TEXT,
  "D_NOMBRE" TEXT,
  "C_PROVMUNINE" TEXT,
  Geometry MULTIPOLYGON
);
​
SELECT RecoverGeometryColumn("MUNICIPIOS", "Geometry", 25830, "MULTIPOLYGON", 2);
SELECT CreateSpatialIndex("MUNICIPIOS" , "Geometry");
​
CREATE TABLE "PROVINCIAS" (
  "PK_UID" INTEGER PRIMARY KEY AUTOINCREMENT,
  "C_PROVINCIA" INTEGER,
  "D_NOMBRE" VARCHAR(15),
  "GEOMETRY" MULTIPOLYGON
);


time_start: 2023-11-16T11:24:49.805Z
time_end: 2023-11-16T11:24:49.990Z
user_agent: spatialite_gui
error_cause: SQL error: table "MUNICIPIOS" already exists
sql_statement:
CREATE TABLE "MUNICIPIOS"(
  "PK_UID" INTEGER PRIMARY KEY AUTOINCREMENT,
  "C_PROVINCIA" INTEGER,
  "C_MUNICIPIO" INTEGER,
  "C_PROVMUN" TEXT,
  "D_NOMBRE" TEXT,
  "C_PROVMUNINE" TEXT,
  Geometry MULTIPOLYGON
);
​
CREATE TABLE "PROVINCIAS" (
  "PK_UID" INTEGER PRIMARY KEY AUTOINCREMENT,
  "C_PROVINCIA" INTEGER,
  "D_NOMBRE" VARCHAR(15),
  "GEOMETRY" MULTIPOLYGON
);


time_start: 2023-11-16T11:24:56.648Z
time_end: 2023-11-16T11:24:56.862Z
user_agent: spatialite_gui
error_cause: success
sql_statement:
CREATE TABLE "PROVINCIAS" (
  "PK_UID" INTEGER PRIMARY KEY AUTOINCREMENT,
  "C_PROVINCIA" INTEGER,
  "D_NOMBRE" VARCHAR(15),
  "GEOMETRY" MULTIPOLYGON
);


time_start: 2023-11-16T11:25:25.962Z
time_end: 2023-11-16T11:25:26.421Z
user_agent: spatialite_gui
error_cause: success
sql_statement:
insert into municipios  ("C_PROVINCIA", "C_MUNICIPIO", "C_PROVMUN", "D_NOMBRE", "C_PROVMUNINE")
select "C_PROVINCIA", "C_MUNICIPIO", "C_PROVMUN", "D_NOMBRE", "C_PROVMUNINE"
FROM muni_orig ;


time_start: 2023-11-16T11:25:41.797Z
time_end: 2023-11-16T11:25:42.243Z
user_agent: spatialite_gui
error_cause: success
sql_statement:
insert into provincias  ("C_PROVINCIA", "D_NOMBRE")
select "C_PROVINCIA", "D_NOMBRE"
FROM prov_orig;


