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

Home -> Community -> Usenet -> c.d.o.misc -> Re: [SQL] Subqueries help needed.

Re: [SQL] Subqueries help needed.

From: Alain Kreienbuhl <akreienb_at_fisystem.fr>
Date: Sat, 19 Feb 2000 12:27:11 +0100
Message-ID: <38AE7E0F.FE6AB88@fisystem.fr>


Forget me ! It works great (forgot the , )

Thanks !

Alain Kreienbuhl wrote:

> Thanks for you reply Sybrand.
>
> Here's what I'm trying to do (with no success) :
>
> select *
> from par_dossier_partage dp
> where (dp.no_dossier_principal, dp.no_avenant) in
> ( select no_dossier_principal, min(no_avenant),
> from par_dossier_partage
> group by no_dossier_principal
> )
>
> I get the same error.
>
> Thanks
> Alain.
>
> Sybrand Bakker wrote:
>
> > should be (col1, col2) in (select ... etc)
> >
> > Hth,
> >
> > Sybrand Bakker, Oracle DBA
> >
> > Alain Kreienbuhl <akreienb_at_fisystem.fr> wrote in message
> > news:38AE4436.63945001_at_fisystem.fr...
> > > Hello,
> > >
> > > I wish to do the following
> > >
> > >
> > > SELECT claim_number
> > > FROM clains
> > > WHERE main_claim_number , secondary_claim_number IN (
> > > SELECT main_claim_number , min
> > > (secondary_claim_number )
> > > FROM clains
> > > GROUP BY main_claim_number )
> > > (this may look wired but some how this is what the query must do )
> > >
> > > My question is actually focusing on the following part of the query
> > >
> > > ... WHERE col1, col2 IN (
> > > SELECT col1, col1
> > > ....
> > > )
> > >
> > > In remember in SQL2 hand book seeing something like that. But Oracle
> > > says :
> > >
> > > "ORA-00920: invalid relational operator
> > > Cause: A search condition was entered with an invalid or missing
> > > relational operator. "
> > >
> > > (I have a real dirty query doing the above but It's to diry to be
> > > used...)
> > >
> > > Thanks for help.
> > >
> > > Alain.
> > >
Received on Sat Feb 19 2000 - 05:27:11 CST

Original text of this message

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