Skip to content
Advertisement

Tag: sql-merge

Optimize Merge query inside n^2 loop

I’ve got a merge query that needs to be executed one time for each combination of day and sessionType inside the request ArrayList. I am using nativeQuery to execute it. Is there a way to plain the source data (two ArrayLists, one with a date range instead a single day, and the other with all the session types), so I

MERGE table, do nothing when matched

I have a table DOMAINS in 2 different schemas with columns ID, NAME,CODE,DESCRIPTION. For any NAME exist in new schema, it should use existing ID without any merge; for those new NAME records, it should insert with ID from old schema. How can i intepret the portion of do nothing in above query? Answer For your case, no need to

Advertisement