[英]Minus function in Optic Query
I have requirement to do minus in one of the use case but in MarkLogic I am not able to use minus function.我需要在其中一个用例中做减号,但在 MarkLogic 中我无法使用减号 function。 Is there any alternate way to do this?有没有其他方法可以做到这一点?
select table1.value1 from table1 where table1.date = '2020-11-27'
minus
select table1.value1 from table1 where table1.date = '2020-11-26'
The " MINUS
" operator is a SPARQL operator. “ MINUS
”运算符是一个 SPARQL 运算符。 Similar functionality is supported in MarkLogic's Optic API using the op:except()
operator. MarkLogic 的 Optic API 使用op:except()
运算符支持类似的功能。 You can also use the " MINUS
" operator in SPARQL and op:from-sparql()
in the Optic API, and the " EXCEPT
" operator in SQL and op:from-sql()
in the Optic API.您还可以使用 SPARQL 中的“ MINUS
”运算符和 Optic API 中的op:from-sparql()
,以及 SQL 中的“ EXCEPT
”运算符和 Optic ZDB9742CE387084 中的op:from-sql()
The minus/subtraction operator in XQuery is "-", like in most languages. XQuery 中的减/减运算符是“-”,就像在大多数语言中一样。 The rest of your code looks a bit like SQL to me (though I last used SQL about 30 years ago) and it will all need changing.你的代码的 rest 在我看来有点像 SQL (尽管我上次使用 SQL 大约是 30 年前),它都需要改变。
I don't now what "Optic Query" is, I'm afraid.恐怕我现在不知道“光学查询”是什么。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.