私はこのクエリを持っています:
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適応型サーバーを使用して、過去1時間のレコードを取得しようとしています。
これを試して !!
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())
以下のクエリを試してください:
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 >= (sysdate-1/24);