Subject Re: [firebird-support] delete using index lookup on FK?
Author Kjell Rilbe
Den 2011-07-21 22:55 skrev Leyne, Sean såhär:
> Try this
>
> EXECUTE BLOCK AS
> DECLARE VARIABLES TOwnerID INTEGER;
> BEGIN
> FOR
> SELECT
> "Id"
> FROM "Owner"
> WHERE
> "IndexedIntCol" = 12345
> INTO
> :TOwnerID
> DO BEGIN
> DELETE FROM "Item" WHERE "Owner" = :TOwnerID;
> END
> END

Ah, yes, that would work I think. Thanks! I'm not accustomed to execute
block yet so I didn't think of that...

Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64