Changes between Version 2 and Version 3 of OriaEda


Ignore:
Timestamp:
Nov 22, 2010 6:01:18 PM (14 years ago)
Author:
cedric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OriaEda

    v2 v3  
    11{{{ 
    2 #!sql 
     2 
     3  #!sql 
    34-- Chargement des noeuds mer qui sont en espagne mais n'ont pas été calculés pour la France 
    45select wso_id from europe.wso where area='Spain' 
     
    2223intersect (select wso_id from ccm21.seaoutlets where area_cd='A1');  
    2324UPDATE europe.wso set area='Spain_Atl' where area IS NULL; 
     25 
     26/*  
     27creation des tables des stations et des barrages  
     28*/ 
     29-- Schema: "oria" 
     30 
     31-- DROP SCHEMA oria; 
     32 
     33--CREATE SCHEMA oria  AUTHORIZATION postgres; 
     34 
     35drop table if exists oria.estaciones_st; 
     36create table oria.estaciones_st (   
     37        st_id character varying(10), 
     38        st_ecoregion character varying(10), 
     39        st_river character varying(40), 
     40        st_name text, 
     41        st_x numeric, 
     42        st_y numeric, 
     43        st_z numeric, 
     44        st_pk_des numeric, 
     45        st_date date, 
     46        st_21fpcomun_num integer, 
     47        st_nha numeric); 
     48alter table oria.estaciones_st add constraint  pk_st_id primary key (st_id); 
     49set client_encoding to 'latin1'; 
     50copy oria.estaciones_st  from 'c:/base/estaciones.csv' with csv delimiter as ';' header;  
     51 
     52drop table if exists oria.operation_op; 
     53create table oria.operation_op ( 
     54        op_date date, 
     55        op_st_id character varying(10), 
     56        op_op_id character varying(10) primary key, 
     57        st_x numeric, 
     58        st_y numeric, 
     59        st_z numeric, 
     60        st_pk_des numeric, 
     61        op_surf numeric, 
     62        op_methodest character varying(30), 
     63        op_fishingobj character varying(30), 
     64        op_nbpas integer, 
     65        op_effort numeric, 
     66        op_densite numeric, 
     67        op_nbtot numeric, 
     68        op_nbp1 numeric, 
     69        op_nbp2 numeric, 
     70        op_nbp3 numeric, 
     71        op_nb150 numeric, 
     72        op_nb150_300 numeric, 
     73        op_nb300_450 numeric, 
     74        op_nb_450_600 numeric, 
     75        op_nb_600 numeric, 
     76        op_glass_eel_transport boolean); 
     77alter table oria.operation_op add constraint  fk_op_st_id foreign key (op_st_id) references oria.estaciones_st(st_id); 
    2478}}}