Get Count using Date and Time [message #375180] |
Thu, 02 August 2001 14:44 |
nmoshou
Messages: 4 Registered: June 2001
|
Junior Member |
|
|
With the select statment below I am trying to get a count of the deals with a trade_dtm between 12AM and 10AM, but when I run the statement I get error ORA-01830. Can anyone help me with my error? The statement runs OK if I take out the time and just count by day.
select count(*)
from dcaf_deals d,
dcaf_sd_deals_vw sd
where d.system_of_origin_id(+) = 3615
and d.origin_deal_num(+) = to_char(sd.deal_id)
and d.dcaf_id is null
and (sd.buyer_contract_num is not null or
sd.seller_contract_num is not null)
and sd.dcaf_deal_type_cd is not null
and sd.spot_term_cd is not null
and sd.active_cd in('ACTIVE','SUSPENDED')
and sd.trade_dtm >= '30-JUL-01 00:00:00'
and sd.trade_dtm < '31-JUL-01 10:00:00'
|
|
|
|
|