Skip to content

Commit a35c67e

Browse files
Merge pull request #270528 from baanders/3-26-query
ADT: Clarify query syntax
2 parents dcda103 + 2472114 commit a35c67e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

articles/digital-twins/reference-query-clause-match.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ If you don't provide a relationship name, the query will include all relationshi
142142
>[!NOTE]
143143
> The examples in this section focus on relationship name. They all show non-directional relationships, they default to a single hop, and they don't assign query variables to the relationships. For instructions on how to do more with these other conditions, see [Specify relationship direction](#specify-relationship-direction), [Specify number of hops](#specify-number-of-hops), and [Assign query variable to relationship](#assign-query-variable-to-relationship-and-specify-relationship-properties). For information about how to use several of these together in the same query, see [Combine MATCH operations](#combine-match-operations).
144144
145-
Specify the name of a relationship to traverse in the `MATCH` clause within square brackets (`[]`). This section shows the syntax of specifying named relationships.
145+
Specify the name of a relationship to traverse in the `MATCH` clause within square brackets (`[]`), after a colon (`:`). This section shows the syntax of specifying named relationships.
146146

147147
For a single name, use the following syntax. The placeholder values that should be replaced with your values are `twin_or_twin_collection_1`, `relationship_name`, and `twin_or_twin_collection_2`.
148148

@@ -152,6 +152,9 @@ For multiple possible names use the following syntax. The placeholder values tha
152152

153153
:::code language="sql" source="~/digital-twins-docs-samples/queries/reference.sql" id="MatchNameMultiSyntax":::
154154

155+
>[!IMPORTANT]
156+
> The colon (`:`) within the square brackets is a required part of the syntax for specifying a relationship name in a `MATCH` query. If you don't include the colon, your query doesn't specify a relationship name. Instead, you have a query that [assigns a query variable to the relationship](#assign-query-variable-to-relationship-and-specify-relationship-properties).
157+
155158
(Default) To leave name unspecified, leave the brackets empty of name information, like this:
156159

157160
:::code language="sql" source="~/digital-twins-docs-samples/queries/reference.sql" id="MatchNameAllSyntax":::
@@ -246,7 +249,7 @@ To assign a query variable to the relationship, put the variable name in the squ
246249

247250
### Examples
248251

249-
The following example assigns a query variable 'r' to the relationship. Later, in the `WHERE` clause, it uses the variable to specify that the relationship Rel should have a name property with a value of 'child'.
252+
The following example assigns a query variable 'Rel' to the relationship. Later, in the `WHERE` clause, it uses the variable to specify that the relationship Rel should have a name property with a value of 'child'.
250253

251254
:::code language="sql" source="~/digital-twins-docs-samples/queries/reference.sql" id="MatchVariableExample":::
252255

0 commit comments

Comments
 (0)