TomSalvato
Technical User
Hi All - I'm trying to get some SQL expressions to work (using Crystal2008 and Oracle DB) ... I basically need to compare a datetime var in the two tables ...
I need the Oracle equivalent to this crystal psuedo-statement ...
day(TABLE1.datevar) = day(TABLE2.datevar) and
month(TABLE1.datevar) = month(TABLE2.datevar) and
year(TABLE1.datevar = year(TABLE2.datever)
both those fields have times that I'm trying to ignore, so the match on day, month and year will work for me ... just don't know how to phrase it in Oracle ...
(
select distinct count("TABLE1"."OBJECTID")
from "DB"."TABLE1"
where
// day(TABLE1.datevar) = day(TABLE2.datevar) and
// month(TABLE1.datevar) = month(TABLE2.datevar) and
// year(TABLE1.datevar = year(TABLE2.datever)
)
-TS
I need the Oracle equivalent to this crystal psuedo-statement ...
day(TABLE1.datevar) = day(TABLE2.datevar) and
month(TABLE1.datevar) = month(TABLE2.datevar) and
year(TABLE1.datevar = year(TABLE2.datever)
both those fields have times that I'm trying to ignore, so the match on day, month and year will work for me ... just don't know how to phrase it in Oracle ...
(
select distinct count("TABLE1"."OBJECTID")
from "DB"."TABLE1"
where
// day(TABLE1.datevar) = day(TABLE2.datevar) and
// month(TABLE1.datevar) = month(TABLE2.datevar) and
// year(TABLE1.datevar = year(TABLE2.datever)
)
-TS