Opened 14 years ago
Last modified 7 years ago
#75 closed task
réintegrarion des numeros d'operation dans station — at Initial Version
Reported by: | cedric | Owned by: | cedric |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | SIG-data | Version: | EDA2.0 |
Keywords: | Cc: |
Description
select * from wrbd.fish_fi left join (select * from wrbd.operation_op where op_nbtotal>0)as ope
on (fi_date,fi_st_id)=(ope.op_date,ope.op_st_id)
except (
select distinct on (fi_id) * from(
select * from wrbd.fish_fi left join (select * from wrbd.operation_op where op_nbtotal>0)as ope
on (fi_date,fi_st_id)=(ope.op_date,ope.op_st_id) ) as sub)
--2357
alter table wrbd.fish_fi add column fi_op_id integer;
-- generation du script d'insert à sauvegarder dans fish_update.txt (je passe au inner join pour ne pas avoir de lignes vides)
-- il faut ensuite remplacer "" par ' et " par rien dans notepad.
-- il doit y avoir encore mieux mais je ne vois pas
select *
from wrbd.fish_fi join (select * from wrbd.operation_op where op_nbtotal>0)as ope
on (fi_date,fi_st_id)=(ope.op_date,ope.op_st_id)
cast(op_id as text) | ' where fi_st_id="' | cast(fi_st_id as text) | '";' |
from wrbd.fish_fi join (select * from wrbd.operation_op where op_nbtotal>0)as ope
on (fi_date,fi_st_id)=(ope.op_date,ope.op_st_id)
order by fi_id ;