Boget, Chris wrote:
> >> Somebody else probably has a more clever way to do it though......
> >I would do this unconditionally.
> >UPDATE ... FROM ... WHERE EXISTS (SELECT ...)
> >INSERT INTO ... WHERE NOT EXISTS (SELECT ...)
> >That are still 2 queries, but better than playing around with triggers.
>
Hmm, in Oracle, before we had MERGE INTO
we did it in the Procedureal language:
- You try to update
- if it doesnt work, insert.
this would lead to such a structure:
update;
if not found then
insert;
end if;
I hope this gives you a hint.
Cheers, Dani