Re: DISTINCT
Date: Thu, 06 May 1999 14:25:41 +0800
Message-ID: <373135E5.4470A2A6_at_clsasia.com>
Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit
Hi
[Quoted] [Quoted] To my knowledge, you cannot use DISTINCT in the where clause as ORACLE [Quoted] appends the rowid of every record fetched in the database block
[Quoted] However there is a work around. You have to use UNION in your where clause [Quoted] and forcefully stop the 1st query fetching records, for instance you can specify
[Quoted] SELECT COL1, COL2, COL3, rowid (oracle will append rowid)
FROM TABLE 1
WHERE 1 = 2 (one will never be equal to 2, hence the 1st select will fail)
UNION
[Quoted] SELECT DISTINCT COL1, COL2, CHARTOROWID('a')
FROM TABLE 2
..
..
(the above query will return your desired values)..
Union will expect all the columns to be of same data type. Therefore you [Quoted] have to use CHARTOROWID of a constant (in our example 'a') and proceed with [Quoted] our logic
Hope this helps
Regards
N.Prabhakar
Markus Schwabe wrote:
> Hello,
>
> Question:
> How do I make a DISTINCT -Clause in my Base-Table-Block?
>
[Quoted]
> SELECT DISTINCT columns FROM table....
>
> Do I have to program it in a Trigger? Which one? And how?
> In the Properties I can handle a Where-Clause, an
> Order-By-Clause...fine.
> But what is with a Distinct? Why exists no Switch in the Properties like
>
> Distinct: true or false, yes or no...
>
> What is with Forms 5/6?
>
> Thank you
> Markus
--------------B5303830E940D585A8E797B7
Content-Type: text/x-vcard; charset=us-ascii;
name="prabhakar.narayanan.vcf"
Content-Transfer-Encoding: 7bit Content-Description: Card for Prabhakar Narayanan Content-Disposition: attachment;
filename="prabhakar.narayanan.vcf"
begin:vcard
n:Narayanan;Prabhakar
tel;work:65 439 5862
x-mozilla-html:FALSE
org:Credit Lyonnais Securities Singapore Pte Ltd;Technology
version:2.1
email;internet:Prabhakar.Narayanan_at_clsasia.com
title:Mr.
adr;quoted-printable:;;32nd Floor=0D=0AHitachi Tower;Singapore;;;Singapore
end:vcard
--------------B5303830E940D585A8E797B7-- Received on Thu May 06 1999 - 08:25:41 CEST