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: Distinct SELECT to query multiple table

Re: Distinct SELECT to query multiple table

From: php_Boi <timani27_at_gmail.com>
Date: 17 Jan 2007 17:33:41 -0800
Message-ID: <1169084021.470776.254300@q2g2000cwa.googlegroups.com>


Well to start off i'd like to thank you for you criticism and lack of assistance. It was completely unhelpful. Firstly i am a C++ programmer with years of experience in that. Secondly the only reason that i am using this is because the intern we have asked and i didn't know and seeing as it was interesting question so i asked in a forum.
Thirdly the question was politely answered by a number of individuals on another group.
Fourthly its people like you that detract from inexperienced members participating in forums to try learn or get help with a problem. It's quite disconcerting to see when people are like you who may be able to help are negative and arrogant.
Lastly i think you'd be better off 'instructing' at the UW and being less pompous and condescending on Internet groups, and actually helping disperse the knowledge you have to others instead of being critical.

DA Morgan wrote:
> php_Boi wrote:
> > Hi have a database with two table. the first table caled dates has a
> > set of codes in a column called tcode(s) in a column that is not unique
> > to allow for repeating entries (yes tables are normalized).
> > +----------------+----------------+--------------+
> > | code | startDate | endDate |
> > +----------------+----------------+--------------+
> > |XYZ | 2005-06-07 |2005-10-11 |
> > +----------------+----------------+--------------+
> > |XYZ | 2005-10-07 |2005-12-11 |
> > +----------------+----------------+--------------+
> > |ZZZ | 2005-06-07 |2005-10-11 |
> > +----------------+----------------+--------------+
> > i want to select only the distinct codes that match search criteria
> > such as this:
> > "SELECT DISTINCT code FROM dates WHERE startDate >= '2007-04-07' AND
> > endDate <= '2005-10-11'
> > The result is then something like
> > XYZ,BBC,GED,PQR...
> >
> >>From there i have a second table called tripper
> > +----------------+----------------+--------------+
> > | code | name | price |
> > +----------------+----------------+--------------+
> > |XYZ | super-skii |200 |
> > +----------------+----------------+--------------+
> > |XYZ | desert sun |10 |
> > +----------------+----------------+--------------+
> > |ZZZ | chicken run |50 |
> > +----------------+----------------+--------------+
> >
> > now ideally for one i could just do this for one code that isnt a
> > problem:
> > SELECT * FROM tripper WHERE price < 10 AND code LIKE XYZ
> >
> > So the question is how to go about it when there are multiple codes? an
> > array? i if anyone has any ideas please dont hesitate would be much
> > appreciated.
> >
> > thanks php_Boi

>

> This is very obviously school work and you need to take this up with
> your instructor.
>

> Please note also that '2007-04-07' is not a date and your LIKE
> condition, as written, contains at least two different errors.
> --
> Daniel A. Morgan
> University of Washington
> damorgan_at_x.washington.edu
> (replace x with u to respond)
> Puget Sound Oracle Users Group
> www.psoug.org
Received on Wed Jan 17 2007 - 19:33:41 CST

Original text of this message

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