Version 5 (modified by cedric, 15 years ago) (diff) |
---|
How to join the BDMAP and CCM ¶
1- Load the BDMAP database, it will be saved by Laurent using a Talend work 2- load the codier_csp table (it is also necessary for R treatments),the following code will create the table and copy it from the csv file (here located in base)
create schema csp; drop table if exists csp.codier; create table csp.codier ("cd_id" integer, "cd_fc_id" integer, "cd_code" varchar(30), "cd_libc" varchar(30), "cd_libl" text, "cd_chaine1" varchar(60), "cd_chaine2" varchar(30), "cd_num1" integer, "cd_num2" integer, "cd_date1" timestamp, "cd_date2" timestamp, "cd_dt_cre"timestamp, "cd_dt_maj" timestamp, "cd_qi_maj" varchar(20), CONSTRAINT c_pk_cd_id PRIMARY KEY (cd_id) ); copy csp.codier from 'c:/base/BDMAP_CODIER.csv' WITH DELIMITER ';' CSV HEADER ;