Subject | Re: [ib-support] Delphi Delete Records |
---|---|
Author | Helen Borrie |
Post date | 2002-11-04T09:40:15Z |
At 10:06 AM 04-11-02 +0100, you wrote:
into a data-tidying component to make it do a task which would be
economical and, by comparison, simple to do on the server in one or a suite
of stored procedures.
create trigger AU_TABLE_B for TableB
active after update position 0
as
begin
if (new.SomeFieldofTableB = 'Bomb it!') then
delete from TableA where <some relationship with an old or new field
in TableB>
end
DELETE FROM aTable
where not (set of conditions)
heLen
>In message <NBBBJKLIEJPCMJJOFDNPMENAEIAA.alan@...>, AlanAs a Delphi programmer, I can imagine the B L O A T you have had to put
>McDonald <alan@...> writes
> >you need stored procedures
> >i doubt it's too complicated for stored procedures
>
>trust me, it is... there are a lot of conditions, and the Delphi
>component written to check them is B I G.
into a data-tidying component to make it do a task which would be
economical and, by comparison, simple to do on the server in one or a suite
of stored procedures.
>The procedure is a 'file tidy' which deletes certain records underSounds like a job for Mr Trigger.
>certain, changing, conditions.
create trigger AU_TABLE_B for TableB
active after update position 0
as
begin
if (new.SomeFieldofTableB = 'Bomb it!') then
delete from TableA where <some relationship with an old or new field
in TableB>
end
>I don't have a problem with the time taken, it runs overnight, but IYou don't mean "file", do you?
>still can't figure out how to delete single records from the file which
>do not meet the criteria.
DELETE FROM aTable
where not (set of conditions)
heLen