sql - get records for the date in between dates -
here table inventory
fromdate todate productid description qty --------- -------- --------- ------------ ---- rec1 8/8/2013 8/12/2013 1111 cream 5 rec2 8/13/2013 8/19/2013 1111 cream 10 rec3 8/20/2013 8/21/2013 1111 cream 20
table dimdate
datedate --------- 8/13/2013 8/14/2013 . . 8/19/2013
how rec2 date 8/15/2013 inventory table?
i using teradata database.
add clause records greater date.
where yourdatefield >= cast(('08/15/2013' (date,format 'mm/dd/yyyy')) date)
Comments
Post a Comment