Here is an idea of what I am trying to do.
The create_dt in the db2 is defined as timestamp field and contain a value such as:
2002-05-28-07.31.09.319006
The create_dt field is indexed and I would like my query to use the index, otherwise I could substr the date and just pick up the date and time. The hold_dt in oracle is a varchar2 field.
The sql I want to build in Oracle would look something like the following:
select dtt.create_dt, dtt.order
from edpq999.dbtsttable@db2.world dtt
,arc.otsttable ott
where dtt.order = ott.order
and dtt.create_dt < to_date(ott.hold_dt,'yyyy-mm-dd-hh24.mi.ss.??????')
How do you map the nano/micro seconds in DB2 (the .319006 in the example above) in the TO_DATE command in sql?
Any feedback would be appreciated.
Thanks
LEBOND
The create_dt in the db2 is defined as timestamp field and contain a value such as:
2002-05-28-07.31.09.319006
The create_dt field is indexed and I would like my query to use the index, otherwise I could substr the date and just pick up the date and time. The hold_dt in oracle is a varchar2 field.
The sql I want to build in Oracle would look something like the following:
select dtt.create_dt, dtt.order
from edpq999.dbtsttable@db2.world dtt
,arc.otsttable ott
where dtt.order = ott.order
and dtt.create_dt < to_date(ott.hold_dt,'yyyy-mm-dd-hh24.mi.ss.??????')
How do you map the nano/micro seconds in DB2 (the .319006 in the example above) in the TO_DATE command in sql?
Any feedback would be appreciated.
Thanks
LEBOND