--- In [email protected], "gastrocus" <gastrocus@...> wrote:
>
> 
> 
> --- In [email protected], "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.

Whoops, I spoke too soon as I had tested it on a table with 1 row first and it 
appeared to work.

The above statement seems to do a separate insert for each row in table which 
does not match the test. 

So, when I tested it on a table which had 100 rows (non matching the 'ZZZZZ' 
test), it inserted 100 new rows, each with a 'ZZZZ' name. 






Reply via email to