Path: news.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!newsfeed.news2me.com!canoe.uoregon.edu!logbridge.uoregon.edu!news-west.eli.net!not-for-mail
Message-ID: <3DCFDC3B.8B8F96A5@exesolutions.com>
From: Daniel Morgan <dmorgan@exesolutions.com>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.databases.oracle.misc
Subject: Re: SELECT DISTINCT and Insert.  Interesting question
References: <2393ddd1.0211060911.1d2d1f6b@posting.google.com> <aqd449$95jhi$1@ID-86071.news.dfncis.de> <2393ddd1.0211081611.2a813896@posting.google.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 51
Date: Mon, 11 Nov 2002 16:35:28 GMT
NNTP-Posting-Host: 156.74.250.7
X-Complaints-To: yvonne.tracy@ci.seattle.wa.us
X-Trace: news-west.eli.net 1037032528 156.74.250.7 (Mon, 11 Nov 2002 09:35:28 MST)
NNTP-Posting-Date: Mon, 11 Nov 2002 09:35:28 MST
Organization: City of Seattle NewsReader Service
Xref: newsfeed1.easynews.com comp.databases.oracle.misc:89203
X-Received-Date: Mon, 11 Nov 2002 09:35:17 MST (news.easynews.com)

Srini wrote:

> Thanks... Matthias and TurkBear.
>
> I'm going to remove the primary key.
>
> Thanks for your time.
> Srini.
>
> Matthias Rogel <rogel@web.de> wrote in message news:<aqd449$95jhi$1@ID-86071.news.dfncis.de>...
> > look at the two rows
> > f1 = 'a', f2 = 'bc'
> > f1 = 'ab', f2 = 'c'
> >
> > they are distinct, but
> > f1 || f2 are the same.
> >
> > mr
> >
> > Srini wrote:
> > > Hi,
> > >
> > > Here is an interesting question seeking for expert's advice.
> > >
> > > SELECT DISTINCT f1, f2, f3 ...
> > >   INTO v1, v2, v3....
> > >   FROM t1, t2....
> > >  WHERE t1.f1 = t2.f1 ....
> > > ORDER BY t1.f1;
> > >
> > > Now I'm trying dump the result into a Temporary table [has only one
> > > coulmn varchar2(255)] like:
> > >
> > > INSERT INTO temp_table(f1) values (v1 || v2 || v3....)
> > >
> > > If the 'f1' in 'temp_table' is the Primary Key, I'm getting Unique
> > > Constraint error.  I was expecting the SELECT DISTINCT to return
> > > unique row.
> > >
> > > Any clue what am I doing wrong here.
> > > Appreciate your valuable time.
> > >
> > > Srini.

I'm not sure what the problem is. But your proposed solution is not the correct one for any
problem.

Please restate the business problem.

Daniel Morgan

