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

Home -> Community -> Usenet -> c.d.o.server -> Re: to all SQL experts...

Re: to all SQL experts...

From: Chris Aiello <caiell02_at_comcast.net>
Date: Sat, 24 Aug 2002 15:55:15 GMT
Message-ID: <D%N99.57744$Aw4.2407643@bin2.nnrp.aus1.giganews.com>


Can't do...I need it to be sql-92 so that I could run against any RDBMS. I am considering using a view...
"D.Y." <dyou98_at_aol.com> wrote in message news:f369a0eb.0208240726.43b73264_at_posting.google.com...
> You can't do it with a single SQL (unless all distinct col1 values
> have the same number of entries). Try PL/SQL, Pro*C, etc.
>
> "Chris Aiello" <caiell02_at_comcast.net> wrote in message
news:<JOB99.155973$2p2.7088303_at_bin4.nnrp.aus1.giganews.com>...
> > I am stumped, although that's not really hard....
> >
> > Here is my predicament:
> >
> > I have a table that has 2 columns, column 1 repeats values and column 2
can
> > have any value. Here's an example
> >
> > col1 col2
> > 1 15
> > 1 35
> > 1 46
> > 1 72
> > 2 10
> > 2 35
> > 2 46
> > 2 11
> > 2 19
> > 2 22
> > 3 15
> > 3 35
> > 3 46
> > 3 72
> > 4 11
> > 4 25
> >
> > Here's the dilemna...
> > I need a query that can find distinct col1 values that have matching
col2
> > entries, along with the same number of entries. For example col1 value
'1'
> > has 4 entries with '15','35','46',and '72'. col1 value 2 has the
entries
> > 10,35,46,11,19 and 22. value 3 has 15,35,46, and 72. col1 values 1 and
3
> > have identical corresponding entries...the same values and the same
number
> > of entries. Can anyone help me out with this??
> > thanks, Chris.
Received on Sat Aug 24 2002 - 10:55:15 CDT

Original text of this message

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