sql - How to pass current date into a query? -


this question has answer here:

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

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -