erledigt:
die folgenden SP braucht 3 Sekunden,
das reicht.
Heiko
SQL-Code:
CREATE PROCEDURE SP_DATAFOX_DELETEDETAILS2 (
THEDATE DATE)
AS
DECLARE VARIABLE iCurId Integer;
begin
for select det2.id from DataFoxInput_Details2 det2
join
DataFoxInput on DataFoxInput.Id = det2.DataFoxInputId
where
DataFoxInput.theDate = :TheDate
into :iCurId do
begin
Delete From DataFoxInput_Details2 Where Id=:iCurId ;
end
Suspend;
end
nächster Test
SQL-Code:
select count(*) from DataFoxInput_Details2 det2_1
Where
det2_1.id in
(
select
det2_2.id from DataFoxInput_Details2 det2_2
join
DataFoxInput on DataFoxInput.Id = det2_2.DataFoxInputId
where
DataFoxInput.theDate = '8.12.2007'
)
ergibt 30 Sekunden.
Ich werde jetzt mal ne SP schreiben.
Heiko