Eng 6396 upsert ad hoc

I would like to, but the problem is that Hsql does not support UPSERT.