question

rpcasey001 avatar image
0 Votes"
rpcasey001 asked LiHongMSFT-3908 answered

Query with 3 Edge Tables and 3 Match Search Conditions (using And)

In the SQL Below, I am using 1 Node Table (Part) and 3 Edge Tables (UasableOn_Part, Substitute_Part, Alternate_Part) and 3 Match Search Conditions.

  • Will this query make any sense?


  • Will 3 Match Search Conditions (using AND) filter only results of all 3 Matches, or Append all 3 Match Search Conditions?

SQL Below:



SELECT --TOP 25

part.[material_code] base_part, Alternate_Part.[material_code] Alternate_Part, Substitute_Part.[material_code] Substitute_Part, UasableOn_Part.[material_code] UasableOn_Part

FROM [flraa_dev].[gn_part_t] part, [flraa_dev].[ge_part_alternate_t] eUON, [flraa_dev].[gn_part_t] UasableOn_Part, [flraa_dev].[ge_part_substitute_t] eSub, [flraa_dev].[gn_part_t] Substitute_Part,

[flraa_dev].[ge_part_alternate_t] eAlt, [flraa_dev].[gn_part_t] Alternate_Part

WHERE MATCH(part-(eUON)->UasableOn_Part)
AND MATCH(part-(eAlt)->Alternate_Part)
AND MATCH(part-(eSub)->Substitute_Part)

sql-server-generalsql-server-transact-sqlmicrosoft-graph-query-parameters
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LiHongMSFT-3908 avatar image
0 Votes"
LiHongMSFT-3908 answered

Hi @rpcasey001

Will this query make any sense?

This query seams to get the parts that are UasableOn, Alternate, and Substitute.

Will 3 Match Search Conditions (using AND) filter only results of all 3 Matches, or Append all 3 Match Search Conditions?

3 Match Conditionsto filter results that match all 3 Conditions .
OR and NOT operators are not supported in the MATCH pattern. MATCH can be combined with other expressions using AND in the WHERE clause.
Please refer to this document for more details.

Best regards,
LiHong


If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.