Skip to content

Commit 7460d71

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 181df07 commit 7460d71

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
@@ -80,15 +80,32 @@ following summarizes the capabilities of the two stages:
8080
however, can be sharded.
8181
- - Can output to a sharded collection. Input collection can
8282
also be sharded.
83-
* - - Corresponds to SQL statements:
84-
85-
- ``INSERT INTO T2 SELECT FROM T1``
86-
- ``SELECT INTO T2 FROM T1``
87-
- - Corresponds to SQL statements:
88-
89-
- ``MERGE``
90-
- ``INSERT INTO T2 SELECT FROM T1``
91-
- ``SELECT INTO T2 FROM T1``
83+
* - - Corresponds to the SQL statements:
84+
85+
- .. code-block:: sql
86+
:copyable: false
87+
88+
INSERT INTO T2 SELECT * FROM T1
89+
90+
- .. code-block:: sql
91+
:copyable: false
92+
93+
SELECT * INTO T2 FROM T1
94+
95+
- - Corresponds to the SQL statement:
96+
97+
- .. code-block:: sql
98+
:copyable: false
99+
100+
MERGE T2 AS TARGET
101+
USING (SELECT * FROM T1) AS SOURCE
102+
ON MATCH (T2.ID = SOURCE.ID)
103+
WHEN MATCHED THEN
104+
UPDATE SET TARGET.FIELDX = SOURCE.FIELDY
105+
WHEN NOT MATCHED THEN
106+
INSERT (FIELDX)
107+
VALUES (SOURCE.FIELDY)
108+
92109
- Create/Refresh Materialized Views
93110

94111
Behaviors

0 commit comments

Comments
 (0)