Re: FORMS45 select distinct problem

From: N Prabhakar <prabhs_at_po.pacific.net.sg>
Date: 1997/02/13
Message-ID: <5dtmlp$mrr$6_at_newton.pacific.net.sg>#1/1


karen_at_tag.com wrote:
>Question with Oracle Forms45 select clause. I want to be able to do a
>select distinct based on 4 columns that exist with in my block that I am
>displaying. Does anyone know a way to do this where I do not have to
>create a view???
>
>Please respond to karen_at_tag.com
>

Hi there,

If you are using the block for query purposes, you can replace the sql statement with the following.

select a,b,c,d, rowid
from base_table
where 1 = 2
union
select distinct a,b,c,d, chartorowid('A') from base_tables

You need to use chartorowid function because rowid will be appended as the last column in the database block. Therefore you need to use chartorowid of a constant (for example 'A').

I have used this in my project and it has worked fine. The only restriction being, it will only work for QUERY ONLY block.

Hope this info helps you

Regards

N.Prabhakar Received on Thu Feb 13 1997 - 00:00:00 CET

Original text of this message