由于意外的语法错误,Microsoft使用SHORTEST_PATH
记录的SQL Graph查询无法正常工作
所有记录的查询由于GRAPH PATH周围的语法错误而失败。例如,以下查询失败:
SELECT
Person1.name AS PersonName,
STRING_AGG(Person2.name, '->') WITHIN GROUP (GRAPH PATH) AS Friends
FROM
Person AS Person1,
friendOf FOR PATH AS fo,
Person FOR PATH AS Person2
WHERE MATCH(SHORTEST_PATH(Person1(-(fo)->Person2)+))
AND Person1.name = 'Jacob'
执行此查询将返回以下错误:
第15级州立1行108消息102
“ GRAPH”附近的语法不正确。
我怀疑该文档不正确。查询应该是什么?