Re: How to join two tables while one is using Date and another is using Timestamp?

From: steph <stephan0h_at_yahoo.de>
Date: Thu, 12 Jun 2008 05:26:34 -0700 (PDT)
Message-ID: <c83ee513-cbd6-4967-a8e0-a172fbc7298e@x35g2000hsb.googlegroups.com>


On 12 Jun., 13:06, Mullin Yu <mullin..._at_gmail.com> wrote:
> How to join two tables while one is using Date and another is using
> Timestamp on Oracle, for example,
>
> select * from Orders o, AuditLog a
> where o.TradeDate = a.EventTs
>
> Orders
> =======
> TradeDate (Date)
> e.g. 14-JUN-08
>
> AuditLog
> =========
> EventTs (Timestamp)
> e.g. 12-JUN-08 10.28.53.083000000 AM
>
> Thanks!
>
> Regards

by removing the time component of the time stamp like:

select * from Orders o, AuditLog a
where o.TradeDate = trunc(a.EventTs) Received on Thu Jun 12 2008 - 07:26:34 CDT

Original text of this message