Subject Re: How to insert only if a matching row does not exist?
Author gastrocus
--- In firebird-support@yahoogroups.com, "Helen" <helebor@...> wrote:

>
> Would you like to try this:
>
> merge into t1 tab2
> using t1 tab1
> on tab1.name = tab2.name and tab1.name = 'ZZZZZ'
> when not matched then
> insert (type, name, sysid, flag) values (1, 'ZZZZZ', 1, 0)
>

That works like a charm!
Thanks Helen.