About 189,000 results
Open links in new tab
  1. SQL MERGE statement to update data - Stack Overflow

    Feb 11, 2013 · This more directly answers the actual question, which looks like an XY problem - it doesn't seem that they were literally asking for a MERGE operation, but rather how to merge …

  2. sql - How to UPSERT (update or insert into a table?) - Stack Overflow

    The UPSERT operation either updates or inserts a row in a table, depending if the table already has a row that matches the data: if table t has a row exists that has key X: update t set mystuf...

  3. sql - Difference between performing INSERT INTO vs Using …

    Mar 8, 2021 · Difference between performing INSERT INTO vs Using MERGE INTO Asked 4 years, 9 months ago Modified 4 years, 9 months ago Viewed 11k times

  4. sql - Implementing SCD Type 2 with merge statement - Stack …

    Jan 29, 2025 · I have two tables in SQL server, the first table Source, has two columns: ID, attribute1, attribute2, and attribute3. The second table, Target, has the same columns as …

  5. sql - MERGE - Multiple WHEN MATCHED cases with update

    Oct 16, 2015 · Possible duplicate of When using multiple WHEN MATCHED statements, do they all execute, or does only one get executed?

  6. sql - Merge into a select statement - Oracle - Stack Overflow

    Jun 1, 2012 · In Oracle you can execute DML on (some) views or subqueries. The guideline is that if Oracle is able to retrieve the physical row from the view, the view is updateable. You …

  7. sql - MERGE INTO insertion order - Stack Overflow

    Jan 13, 2015 · MERGE INTO someTable st USING ( SELECT id,field1,field2,etc FROM otherTable ) ot on st.field1=ot.field1 WHEN NOT MATCHED THEN INSERT (field1,field2,etc) …

  8. sql - Merge into table with 'with' statement? - Stack Overflow

    Jan 1, 2023 · I need to update or insert to table range of dates with some data. For example, I get startDate = 01/01/2022 and endDate = 01/01/2023, and I need to add 365 rows on this table …

  9. SQL Server: combining multiple rows into one row

    SQL Server: combining multiple rows into one row Asked 14 years, 1 month ago Modified 4 years, 6 months ago Viewed 524k times

  10. sql - MERGE with WHERE clause - Stack Overflow

    Sep 10, 2019 · The key is that you want to make sure that the record falls into the MATCHED logic, otherwise it will generate a new row via the NOT MATCHED logic. To do this, using your …