gpt4 book ai didi

sql - 获取最近一小时的记录

转载 作者:行者123 更新时间:2023-12-01 17:37:17 24 4
gpt4 key购买 nike

我有这个查询:

SELECT Field1, OrderFor, Writeback, Actshipdate, Orderstatus, receivedate, receivetime
FROM orderinfo, shippinginfo
WHERE orderinfo.orderid = shippinginfo.orderid
AND shippinginfo.custid = '37782'
AND receivedate = DATE(NOW())
AND receivetime = ???????

我在任何地方使用 Sybase 自适应服务器并尝试获取最后一小时的记录。

最佳答案

试试这个!!

SELECT Field1, OrderFor, Writeback, Actshipdate, Orderstatus, receivedate, receivetime
FROM orderinfo, shippinginfo
WHERE orderinfo.orderid = shippinginfo.orderid
AND shippinginfo.custid = '37782'
AND receivedate = DATE(NOW())
AND receivetime > DATEADD(HOUR, -1, GETDATE())

关于sql - 获取最近一小时的记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19743850/

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