Subject | Re: How to insert only if a matching row does not exist? |
---|---|
Author | gastrocus |
Post date | 2011-10-20T21:13:40Z |
--- In firebird-support@yahoogroups.com, "Helen" <helebor@...> wrote:
Thanks Helen.
>That works like a charm!
> 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)
>
Thanks Helen.