我有这个问题:
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,receivetime FROM orderinfo,shippinginfo WHERE orderinfo.orderid = shippinginfo.orderid AND shippinginfo.custid = '37782' AND receivedate = DATE(NOW()) AND receivetime > DATEADD(HOUR,-1,GETDATE())