gpt4 book ai didi

c# - DocumentDB 查询中的运算符之间

转载 作者:太空宇宙 更新时间:2023-11-03 23:32:55 26 4
gpt4 key购买 nike

Date 数据类型可以在 documentdb 中使用 Between 运算符吗?

我的查询是这样的

"select * from doc where doc.class= 8 AND doc.section= 'A' and doc.dateOfBirth Between 7/20/1995 12:00:00 AM and 7/27/2015 11:59:59 PM"

它正在返回消息错误请求的异常。

{"Message: {\"errors\":[{\"severity\":\"Error\",\"location\":{\"start\":167,\"end\":169},\"code\":\"SC1001\",\"message\":\"Syntax error, incorrect syntax near '12'.\"}]}\r\nActivityId: 71af58f5-5b60-467a-97f4-eec9b91e0d50, Request URI: /apps/4c8d65d7-216b-46b4-abb7-52c1a0c7123f/services/b86da69b-7112-4c42-89c8-d97ca2f0bed6/partitions/07e9f066-670b-4b4b-96a8-352ed4a8c477/replicas/130810328249395810s"}

如有任何帮助,我们将不胜感激。

提前致谢。

最佳答案

这里有一个双 and 运算符

doc.section= 'A' AND  and doc.dateOfBirth

并且您在查询末尾关闭了一个括号,但您还没有打开一个

12:00:00 AM and 7/27/2015 11:59:59 PM)

支持 between 运算符,如文档所述 here .

关于c# - DocumentDB 查询中的运算符之间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31515242/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com