Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

? accessing timestamp field from Oracle via Oracle DB2 Gateway

Status
Not open for further replies.

lebond

Programmer
May 24, 2002
4
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top