SELECT we.wip_entity_name ,
wl.line_code ,
TO_CHAR(wdj.creation_date,'DD-MON-YYYY HH24:MI:SS') creation_date ,
DECODE( p_org_id,4853,TO_CHAR(sajet.get_wo_date@sfisge6(we.wip_entity_name),'DD-MON-YYYY HH24:MI:SS'),
TO_CHAR(sajet.get_wo_date@sfisge(we.wip_entity_name),'DD-MON-YYYY HH24:MI:SS')) start_date,
msi.segment1 ,
msi.description,
wdj.start_quantity,
wdj.quantity_completed,
wdj.status_type,
TO_CHAR(wdj.date_completed,'fmDD-MON-YYYY HH24:MI:SS') date_completed,
wdj.wip_entity_id
FROM wip_discrete_jobs wdj,
wip_entities we,
wip_lines wl,
mtl_system_items msi
WHERE 1 = 1
AND we.wip_entity_id = wdj.wip_entity_id
AND we.organization_id = wdj.organization_id
AND msi.inventory_item_id = wdj.primary_item_id
AND msi.organization_id = wdj.organization_id
AND wl.line_id = wdj.line_id
AND wl.organization_id = wdj.organization_id
AND wdj.creation_date BETWEEN p_fm_date AND p_to_date
AND wdj.organization_id = p_org_id
and status_type = n_status这是部份查询SQL 现在是要卡一个用户输入的时间不在超过180天,求各位帮忙分析思路以及部分写法。新手掌握的不是很多
1 回答
qq_青瓜_03599418
TA贡献1条经验 获得超0个赞
首先获取用户输入的时间的年月日,然后在此基础上加上180天,之后对这个结果进行处理,在到了180天之后,你该怎么办就怎么办。建议查看oracle中操作日期的相关资料,相信你会学到更多的知识。
- 1 回答
- 0 关注
- 1278 浏览
添加回答
举报
0/150
提交
取消