All Questions

486
votes
16answers
294864 views

Insert, on duplicate update in PostgreSQL?

Several months ago I learned from an answer on Stack Overflow how to perform multiple updates at once in MySQL using the following syntax: INSERT INTO table (id, field, field2) VALUES (1, A, X), (2, ...
182
votes
5answers
112095 views

How to UPSERT (MERGE, INSERT ... ON DUPLICATE UPDATE) in PostgreSQL?

A very frequently asked question here is how to do an upsert, which is what MySQL calls INSERT ... ON DUPLICATE UPDATE and the standard supports as part of the MERGE operation. Given that PostgreSQL ...
93
votes
4answers
269671 views

ORA-30926: unable to get a stable set of rows in the source tables

I am getting ORA-30926: unable to get a stable set of rows in the source tables in the following query: MERGE INTO table_1 a USING (SELECT a.ROWID row_id, 'Y' FROM...
8
votes
1answers
7980 views

MERGE in Entity Framework

Is there a way to call T-Sql's MERGE command from .NET Entity framework 4?
8
votes
1answers
13111 views

SQL Server MERGE + Joining other tables

I am using the MERGE statement within a database project to populate reference data from a static value set, such as the following below: MERGE INTO dbo.[User] AS TARGET USING (VALUES ('me@so...
7
votes
2answers
21510 views

UPDATE or MERGE of very big tables in SQL Server

I need to perform a daily update of a very large (300M records) and broad TABLE1. The the source data for the updates is located in another table UTABLE that is 10%-25% the rows of TABLE1 but is narro...
1
votes
1answers
1434 views

T-SQL MERGE Performance in typical publishing context

I have situation where a "publisher" application essentially keeps a view model up to date by querying a VERY complex view and then merging the results into a denormalized view model table, using sepa...
3
votes
2answers
1877 views

JdbcTemplate - Insert or update Oracle BLOB using SQL MERGE

Using JdbcTemplate I would like to call MERGE SQL statement which will insert a new record to the table or update if row with specific key already exists. The key part is that one of the column is of ...
0
votes
1answers
54 views

Table Valued Parameter issue with MONO cs

I have a simple code to create SqlParameter for Table Valued Type. The given code works just fine with .NET 4.0. Issue is with MONO CS (3.12.0), I cannot simply compile the same code in MONO. static ...
10
votes
2answers
22961 views

Oracle Merge vs Select then Insert or Update

What is faster? the Merge statement MERGE INTO table_name USING dual ON (row_id = 'some_id') WHEN MATCHED THEN UPDATE SET col_name = 'some_val' WHEN NOT MATCHED THEN ...

Previous Next