我有这个查询:
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())