Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL join on date

Re: SQL join on date

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Thu, 29 Jul 1999 15:23:34 GMT
Message-ID: <37a2718b.96231423@inet16.us.oracle.com>


On Thu, 29 Jul 1999 14:04:19 GMT, sxr@_nospam_hotmail.com (Blue) wrote:

>I would like to join two tables by a date field..
>
>The first table always has a date plus a time value in the date field.
>
>The second table always has a just a date value, time is always 0
>
>What is the best SQL join statement to link them based on the date
>value only, ignoring time

try...

select blah
  from T1, T2
 where trunc(t1.date_field) = t2.date_field

chris.

>
>Sorry if this is a stupid question but Oracle through impromptu locks
>up if I use a function to convert the date-time to a date.
>
>Blue

--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Jul 29 1999 - 10:23:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US