Subject TIBOQuery EditSQL with an anonymous sql block
Author lsolart
Is it possible to create an anonymous SQL block at a customized
TIBOQuery.EditSQL sentence? Let's say:

begin
if (itemId is not null) then
update items
set value = :value
where itemId = :itemId;
else
begin
:itemId = gen_id(items_sq, 1);
insert into items (orderId, itemId, value)
values (:orderId, :itemId, :value);
end
end;

I do this because the sql is a outer joined query, so the dataset
suposes that record exists and it calls directly EditSQL sentence
instead InsertSQL one.

Thanks,
Luis Solar.