Re: Table differences

From: Somaskandan <>
Date: Sat, 13 Jun 2009 08:03:44 -0700 (PDT)
Message-ID: <>

On Jun 10, 4:47 pm, Thomas Kellerer <> wrote:
> wrote on 10.06.2009 22:38:
> > I'm sure there is a way to do this.  Have not found it yet.
> > But, I have 2 tables, different structures.  Both have a date column.
> > I want to get the rows from table A which do not exist in table B,
> > based on the date:
> > I want to get the rows in TABLE A which are not in TABLE B, based
> > solely on the DATE_COL.  I do not think I can use MINUS due to the
> > column difference.  And, this is going to a user, so cannot use PL/SQL
> > either.....
> FROM table_a
> WHERE date_col NOT IN (SELECT date_col FROM table_b WHERE date_col IS NOT NULL)
> You are aware that the DATE datatype in Oracle contains a time part as well?

Yeah. I am aware of that. Date datatype allows

  1. date without time part
  2. date with time part

to be stored. In this case, the person who posted the question didn't mention anything related to time part. If the time part is part of the date and it needs to be ignored then TRUNC needs to be used. If the time part also needs to be considered then the current query will do that exactly. Received on Sat Jun 13 2009 - 10:03:44 CDT

Original text of this message