[英]oracle apex timestamp interval with sysdate
hi here i have a problem, i want to remove the expired entry from the table so I used the SQL where clause here is my SQL code嗨,我有一个问题,我想从表中删除过期的条目,所以我使用了 SQL where 子句是我的 SQL 代码
select ROWID,
FOOD_RECEIVED_UID,
USER_NAME,
ITEM_TYPE,
ITEM,
QUANTITY,
EXPIRY_DATE,
CREATED_ON,
CREATED_BY,
UPDATED_ON,
UPDATED_BY,
USER_UID
from FOOD_RECEIVED
WHERE (ITEM_TYPE = :P9_ITEM_TYPE OR :P9_ITEM_TYPE IS NULL)and EXPIRY_DATE > SYSTIMESTAMP
Here is the photo copy:这是照片副本:
could anyone help me to fix this...谁能帮我解决这个问题...
Aren't expired products those whose expiry_date
has already passed?过期的产品不就是expiry_date
已经过去的吗? <
, not >
. <
,不是>
。
and EXPIRY_DATE < SYSTIMESTAMP
Though, I doubt that expiry_date
is a timestamp;不过,我怀疑expiry_date
是时间戳; looks more like a date
, so:看起来更像一个date
,所以:
and EXPIRY_DATE < SYSDATE
It isn't really clear to me what kind of solution you're looking for.我不清楚您正在寻找什么样的解决方案。
Do you want a SQL statement which removes all of the expired items in once?你想要一个一次性删除所有过期项目的 SQL 语句吗?
In that case, convert the select statement into a delete statement delete from FOOD_RECEIVED where....
在这种情况下,将 select 语句转换为 delete 语句delete from FOOD_RECEIVED where....
Do you want a delete button in your report to remove them individually?您希望报告中的删除按钮单独删除它们吗?
Did you try to use the the APEX wizard to create the page?您是否尝试使用 APEX 向导创建页面? Create a Page -> Report -> Report with Form .创建一个 Page -> Report -> Report with Form 。 Using that, APEX will create a modal dialog for you where you can delete the individual items.使用它,APEX 将为您创建一个模式对话框,您可以在其中删除各个项目。
Hope this helps you.希望这对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.