Re: select distinct in oracle forms4.5

From: lge <elkinsl_at_flash.net>
Date: 1997/06/06
Message-ID: <33989aed.82840553_at_news.flash.net>#1/1


Janice,

There are many good approaches. One I haven't seen mentioned yet, and that has been around for ages, includes the use of a sub-query in the base table block's where clause. For example, the following placed in the where property of a block based on EMP would return just three rows -- one for each distinct value of Deptno in the EMP table:

Rowid In (Select Max(Rowid)

          From   Emp
          Group By Deptno)

The are a number of ways in which you can code the sub-query to accomplish your goals.

The above approach can be useful if you want to allow the user to toggle back and forth between selecting distinct rows or not. Use the Block Property Deafult Where to modify the base query (or the # technique in 3.0 and earlier) accordingly.

powell_at_clemson.edu (Janice Powell) wrote:

>I have a base table block that I want to perform a distinct query on. How
>can I do that via execute_query?
>
>Please send any replies to powell_at_clemson.edu.
>
>Thanks for any info that can be provided.
>
>--JP
>
>Janice Powell
>Application Analyst
>Clemson University
>
Received on Fri Jun 06 1997 - 00:00:00 CEST

Original text of this message