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: How do I select distinct values when user executes query?

Re: How do I select distinct values when user executes query?

From: Randy DeWoolfson <randy_at_euclidsys.com>
Date: Wed, 21 Jul 1999 19:46:16 -0400
Message-ID: <37965BC7.788FC292@euclidsys.com>


Hey John.

Usually, 'a single table with all your data' isn't the optimal solution.

if you can logically 'divide this table into three blocks', then I bet you
can physically divide that same table into 3 tables.

when you do this, the SHIP_NO will most likely be a unique key in one of the tables. when this is true, then a simple select will return all
the unique values.

if you can not break up the mega-table into smaller ones, then look up the DISTINCT keyword.

good luck
randy

John Smithy wrote:

> Hi,
>
> I know this is probably dumb. I have a single table with all my data.
> One column is called ship_no. For each ship_no, there are many
> rows. So when a user queries on this, he/she will see many rows
> for each ship_no. I have this table divided into three blocks. The
> master block just has ship_no. The details are in the other blocks.
> The user will query on ship_no. I only want to display the unique
> value. Can someone help me out? I am a new Oracle Developer.
> I am coding with Forms 5.0
>
> Thanks,
> John
Received on Wed Jul 21 1999 - 18:46:16 CDT

Original text of this message

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