1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
DECLARE
CURSOR MAREQ IS
SELECT * FROM temp_obi_of_jour ;
begin
FOR lig_reg IN mareq loop
declare
pdateheuredebut timestamp := dateheuredebut;
pdateheurefin timestamp := dateheurefin;
begin
while pdateheuredebut-pdateheurefin>=0 loop
INSERT INTO temp_obi_of_jour_minute (CODECDC,CODEOF,DATECDC,DATEHEUREMINUTE,NUMLIGNEOF,CODEMAGASIN) VALUES(lig_reg.CODECDC,lig_reg.CODEOF,lig_reg.DATECDC,pdateheuredebut,lig_reg.NUMLIGNEOF,lig_reg.CODEMAGASIN);
pdateheuredebut := pdateheuredebut + interval '1' minute;
end loop;
end;
end loop;
end; |