Re: Table differences
Date: Wed, 10 Jun 2009 22:47:19 +0200
Message-ID: <79akeeF1q07s7U1_at_mid.individual.net>
art_at_unsu.com 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:
>
> TABLE A: COL1, DATE_COL
> TABLE B: COL1, COL2, COL3, DATE_COL
>
> 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.....
>
SELECT *
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? Received on Wed Jun 10 2009 - 15:47:19 CDT