--benthos lengte update pruts.t2benthos set value = lengte where lengte is not null; update pruts.t2benthos set value = null where lengte is null; update pruts.t2benthos set idmethod = 0 where lengte is not null; update pruts.t2benthos set idobservation_type = 33 where soortnaam is not null; update pruts.t2benthos set idunit = 7 where lengte is not null; update pruts.t2benthos set quality = 1 where lengte is not null; insert into observation (idmethod,idunit,date,value,idlocation,idparameter,idobservation_type,idsample,idquality) select i.idmethod ,i.idunit ,i.date ,i.value ,i.idlocation ,i.idparameter ,i.idobservation_type ,i.locid ,i.quality FROM pruts.t2benthos i where lengte is not null and value is not null and date <> '20081015'; --benthos aantal update pruts.t2benthos set value = aantal where soortnaam is not null; update pruts.t2benthos set value = 0 where idparameter = 42543; update pruts.t2benthos set value = null where aantal = null; update pruts.t2benthos set idmethod = 49 where soortnaam is not null; update pruts.t2benthos set idobservation_type = 16 where soortnaam is not null; update pruts.t2benthos set idunit = 18 where soortnaam is not null; update pruts.t2benthos set quality = 1 where soortnaam is not null; insert into observation (idmethod,idunit,date,value,idlocation,idparameter,idobservation_type,idsample,idquality) select i.idmethod ,i.idunit ,i.date ,i.value ,i.idlocation ,i.idparameter ,i.idobservation_type ,i.locid ,i.quality FROM pruts.t2benthos i where soortnaam is not null and value is not null and date <> '20081015'; --benthos Natgewicht update pruts.t2benthos set value = natgewicht_mg where soortnaam is not null; update pruts.t2benthos set value = 0 where idparameter = 42543; update pruts.t2benthos set value = null where natgewicht_mg = null; update pruts.t2benthos set idobservation_type = 4 where soortnaam is not null; update pruts.t2benthos set idunit = 33 where soortnaam is not null; update pruts.t2benthos set quality = 1; update pruts.t2benthos set idmethod = 0 where quality = 1; insert into observation (idmethod,idunit,date,value,idlocation,idparameter,idobservation_type,idsample,idquality) select i.idmethod ,i.idunit ,i.date ,i.value ,i.idlocation ,i.idparameter ,i.idobservation_type ,i.locid ,i.quality FROM pruts.t2benthos i where natgewicht_mg is not null and value is not null and date <> '20081015'; --benthos Asvrij drooggewicht update pruts.t2benthos set value = asvrdrooggewicht_mg where soortnaam is not null; update pruts.t2benthos set value = 0 where idparameter = 42543; update pruts.t2benthos set value = null where asvrdrooggewicht_mg = null; update pruts.t2benthos set idobservation_type = 5 where soortnaam is not null; update pruts.t2benthos set idunit = 33 where soortnaam is not null; update pruts.t2benthos set quality = 1; update pruts.t2benthos set idmethod = 0 where quality =1; insert into observation (idmethod,idunit,date,value,idlocation,idparameter,idobservation_type,idsample,idquality) select i.idmethod ,i.idunit ,i.date ,i.value ,i.idlocation ,i.idparameter ,i.idobservation_type ,i.locid ,i.quality FROM pruts.t2benthos i where asvrdrooggewicht_mg is not null and value is not null and date <> '20081015'; --benthos Dichtheid update pruts.t2benthos set value = dichtheid where dichtheid is not null; update pruts.t2benthos set value = null where dichtheid = null; update pruts.t2benthos set idmethod = 43 where dichtheid is not null; update pruts.t2benthos set idobservation_type = 3 where dichtheid is not null; update pruts.t2benthos set idunit = 4 where dichtheid is not null; update pruts.t2benthos set quality = 1 where dichtheid is not null; insert into observation (idmethod,idunit,date,value,idlocation,idparameter,idobservation_type,idsample,idquality) select i.idmethod ,i.idunit ,i.date ,i.value ,i.idlocation ,i.idparameter ,i.idobservation_type ,i.locid ,i.quality FROM pruts.t2benthos i where dichtheid is not null and value is not null and date <> '20081015'; --benthos Massa update pruts.t2benthos set value = massa_mg_m2 where massa_mg_m2 is not null; update pruts.t2benthos set value = null where massa_mg_m2 is null; update pruts.t2benthos set idmethod = 0 where massa_mg_m2 is not null; update pruts.t2benthos set idobservation_type = 13 where massa_mg_m2 is not null; update pruts.t2benthos set idunit = 6 where massa_mg_m2 is not null; update pruts.t2benthos set quality = 1 where massa_mg_m2 is not null; insert into observation (idmethod,idunit,date,value,idlocation,idparameter,idobservation_type,idsample,idquality) select i.idmethod ,i.idunit ,i.date ,i.value ,i.idlocation ,i.idparameter ,i.idobservation_type ,i.locid ,i.quality FROM pruts.t2benthos i where massa_mg_m2 is not null and value is not null and date <> '20081015'; --benthos Biomassa update pruts.t2benthos set value = biomassa_mg_m2 where biomassa_mg_m2 is not null; update pruts.t2benthos set value = null where biomassa_mg_m2 is null; update pruts.t2benthos set idmethod = 0 where biomassa_mg_m2 is not null; update pruts.t2benthos set idobservation_type = 34 where biomassa_mg_m2 is not null; update pruts.t2benthos set idunit = 6 where biomassa_mg_m2 is not null; update pruts.t2benthos set quality = 1 where biomassa_mg_m2 is not null; insert into observation (idmethod,idunit,date,value,idlocation,idparameter,idobservation_type,idsample,idquality) select i.idmethod ,i.idunit ,i.date ,i.value ,i.idlocation ,i.idparameter ,i.idobservation_type ,i.locid ,i.quality FROM pruts.t2benthos i where biomassa_mg_m2 is not null and value is not null and date <> '20081015';