Re: Index or SQL?

From: Willy Klotz <willyk_at_kbigate.stgt.sub.org>
Date: Mon, 03 Oct 94 21:12:42 GMT
Message-ID: <781218762snx_at_kbigate.stgt.sub.org>


system0_at_news.delphi.com writes in article <36i75u$n6v_at_news.delphi.com>:
>
> Anyone have any problems with ORACLE 6.0.36 not recognizing two
> identical fields from different tables as being equal? Basically
> I have two tables which are identically in every way, except one
> table has a concatenated unique index composed of the following:
> firstname,lastname,middleinitial,dob, and ssn. The first table (table a)
> has the index, the second table has no index and is just temporary.
> The query:
> Select a.firstname,b.firstname,
> a.lastname,b.lastname,
> a.middleinitial,b.middleinitial,
> a.dob,b.dob,
> a.ssn,b.ssn
> from destination a,source b
> where a.firstname = b.firstname and
> a.lastname = b.lastname and
> a.middleinitial = b.middleinitial and
> a.dob = b.dob and
> a.ssn = b.ssn;
>
> The result is no rows selected.
> However the statement:
> Insert into destination select * from source;
> That will generate an error due to the above index.
> I've queried the dba_ind_columns to verify no additional indexes exist...
> Any ideas out there in ORACLE land?
>
>

Just a thought: maybe there are duplicate records in your "source" table ?

Try to create a unique index on the fields in the soure table; if this is unsuccessful, you have dups...

Willy

>


Willys Mail     FidoNet   2:2474/117  2:2474/118     Mail Only System
                CIS: 100020,3517       USR Courier HST dual standard
                willyk_at_kbigate.franken.de
                willyk_at_kbigate.stgt.sub.org
                ->   No Request from 06.00 to 08.00 <-
======================================================================
Received on Mon Oct 03 1994 - 22:12:42 CET

Original text of this message