sql - How to pass current date into a query? -
this question has answer here:
- oracle select date between today 4 answers
i'm trying pass sysdate query , respective result i'm getting no record.
sql> select proc_pd_cd ps_proc_pd pd_strt_dt = sysdate 2 ; no rows selected
if want current date, can using sysdate
. if field has no time component:
select proc_pd_cd ps_proc_pd pd_strt_dt = trunc(sysdate);
otherwise:
select proc_pd_cd ps_proc_pd pd_strt_dt >= trunc(sysdate) , pd_strt_dt < trunc(sysdate + 1);
Comments
Post a Comment