Skip to content

Commit 4197138

Browse files
authored
* OCSP-20523 update sql code * rearrange code blocks in list * fix tense * add the * add copyable false * complete select statements * remove following
1 parent d3ceea0 commit 4197138

File tree

1 file changed

+26
-9
lines changed
  • source/reference/operator/aggregation

1 file changed

+26
-9
lines changed

source/reference/operator/aggregation/out.txt

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,32 @@ following summarizes the capabilities of the two stages:
123123
however, can be sharded.
124124
- - Can output to a sharded collection. Input collection can
125125
also be sharded.
126-
* - - Corresponds to SQL statements:
127-
128-
- ``INSERT INTO T2 SELECT FROM T1``
129-
- ``SELECT INTO T2 FROM T1``
130-
- - Corresponds to SQL statements:
131-
132-
- ``MERGE``
133-
- ``INSERT INTO T2 SELECT FROM T1``
134-
- ``SELECT INTO T2 FROM T1``
126+
* - - Corresponds to the SQL statements:
127+
128+
- .. code-block:: sql
129+
:copyable: false
130+
131+
INSERT INTO T2 SELECT * FROM T1
132+
133+
- .. code-block:: sql
134+
:copyable: false
135+
136+
SELECT * INTO T2 FROM T1
137+
138+
- - Corresponds to the SQL statement:
139+
140+
- .. code-block:: sql
141+
:copyable: false
142+
143+
MERGE T2 AS TARGET
144+
USING (SELECT * FROM T1) AS SOURCE
145+
ON MATCH (T2.ID = SOURCE.ID)
146+
WHEN MATCHED THEN
147+
UPDATE SET TARGET.FIELDX = SOURCE.FIELDY
148+
WHEN NOT MATCHED THEN
149+
INSERT (FIELDX)
150+
VALUES (SOURCE.FIELDY)
151+
135152
- Create/Refresh Materialized Views
136153

137154
Behaviors

0 commit comments

Comments
 (0)