Version 9 (modified by celine, 14 years ago) (diff) |
---|
back to first page..
back to WRBD
drop table if exists wrbd.fish_fi; create table wrbd.fish_fi ( fi_folio_no character varying(50), fi_st_id character varying(10), fi_fish_id character varying(10), fi_date date, fi_year integer, fi_individual_life character varying(10), fi_retained character varying(10), fi_length numeric ); copy wrbd.fish_fi from 'C:/base/Operation_fish_14_Eel_Db_MI_Rivers.csv' with csv delimiter as ';' ; copy wrbd.fish_fi from 'D:/CelineJouanin/POSEProject/Ireland/DataIreland/Operation_fish_14_Eel_Db_MI_Rivers.csv' with csv delimiter as ';' header; --2208 lines copy wrbd.fish_fi(fi_folio_no,fi_st_id,fi_fish_id,fi_date,fi_year,fi_individual_life,fi_retained,fi_length) from 'D:/CelineJouanin/POSEProject/Ireland/DataIreland/4.WRBD_NDP_dbase_Historical_Lakes_and_all_burr_silvers.csv' with csv delimiter as ';' header ;
alter table wrbd.fish_fi rename column fi_id to fi_fishid; alter table wrbd.fish_fi add column fi_id serial PRIMARY KEY;
-- pour aller rajouter les op_id dans la table poissons ticket #75
alter table wrbd.fish_fi add column fi_op_id integer; --sous la console cmd: D : cd D:\CelineJouanin\POSEProject\Ireland\DataIreland C:\"Program Files"\PostgreSQL\8.4\bin\psql -U postgres --dbname "eda2.0" -f "update_fish.sql"
- Integration the data from 4.WRBD_NDP_ddbase Historical lakes and all Burr silvers
ALTER TABLE wrbd.fish_fi ADD COLUMN fi_op_nbdays integer; copy wrbd.fish_fi(fi_folio_no,fi_st_id,fi_fish_id,fi_date,fi_year,fi_individual_life,fi_retained,fi_length,fi_op_nbdays) from 'D:/CelineJouanin/POSEProject/Ireland/DataIreland/4.WRBD_NDP_dbase_Historical_Lakes_and_all_burr_silvers.csv' with csv delimiter as ';' header ;