Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Distinct SELECT to query multiple table
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 |i want to select only the distinct codes that match search criteria such as this:
+----------------+----------------+--------------+
|XYZ | 2005-10-07 |2005-12-11 |
+----------------+----------------+--------------+
|ZZZ | 2005-06-07 |2005-10-11 |
+----------------+----------------+--------------+
|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 Received on Wed Jan 17 2007 - 00:37:23 CST