您好我正在尝试搜索名称为“ MainReference ”的节点,并且包含属性“ id ”,其值等于“ FK123456 “或” 123456 “在给定路径中。 当我在代码中使用查询构建器执行此操作时,它正常工作。为此,我正在使用这个声明:
SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE(['/etc/commerce/products/flipkart']) and CONTAINS(s.*, 'MainReference')and (s.['id']='FK123456' OR s.['id']='123456' )
但是当我尝试使用crxdelite搜索它时 - >工具 - >查询,使用以下语句:
SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE(s,'/etc/commerce/products/flipkart') and CONTAINS NAME() = 'MainReference' and (s.id, 'FK123456' OR s.id='123456')
它在声明中给出了一些错误。
你能帮帮我吗?如何使用搜索功能中的查询工具执行相同的查询。查询类型是SQL2错误是 - SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE(s,'/etc/commerce/products/flipkart') and CONTAINS NAME() = 'MainReference' and (s.id, 'FK123456' OR s.id='123456'); expected: (, ., =, <>, <, >, <=, >=, LIKE, IS, NO
答案 0 :(得分:0)
你有一个明显的错误 - 那里有错误的地方。你甚至不需要它。试试这个:
SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE(s,'/etc/commerce/products') and NAME() = 'MainReference' and (s.id='FK123456' OR s.id='123456')