Skip to content

Commit f3d659e

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 bf050a0 commit f3d659e

File tree

1 file changed

+25
-8
lines changed
  • source/reference/operator/aggregation

1 file changed

+25
-8
lines changed

source/reference/operator/aggregation/out.txt

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,32 @@ following summarizes the capabilities of the two stages:
118118
however, can be sharded.
119119
- - Can output to a sharded collection. Input collection can
120120
also be sharded.
121-
* - - Corresponds to SQL statements:
121+
* - - Corresponds to the SQL statements:
122+
123+
- .. code-block:: sql
124+
:copyable: false
125+
126+
INSERT INTO T2 SELECT * FROM T1
127+
128+
- .. code-block:: sql
129+
:copyable: false
130+
131+
SELECT * INTO T2 FROM T1
132+
133+
- - Corresponds to the SQL statement:
134+
135+
- .. code-block:: sql
136+
:copyable: false
137+
138+
MERGE T2 AS TARGET
139+
USING (SELECT * FROM T1) AS SOURCE
140+
ON MATCH (T2.ID = SOURCE.ID)
141+
WHEN MATCHED THEN
142+
UPDATE SET TARGET.FIELDX = SOURCE.FIELDY
143+
WHEN NOT MATCHED THEN
144+
INSERT (FIELDX)
145+
VALUES (SOURCE.FIELDY)
122146

123-
- ``INSERT INTO T2 SELECT FROM T1``
124-
- ``SELECT INTO T2 FROM T1``
125-
- - Corresponds to SQL statements:
126-
127-
- ``MERGE``
128-
- ``INSERT INTO T2 SELECT FROM T1``
129-
- ``SELECT INTO T2 FROM T1``
130147
- Create/Refresh Materialized Views
131148

132149
Behaviors

0 commit comments

Comments
 (0)