Re: problems of comparators in Oracle

From: Thomas J Kyte <tkyte_at_us.oracle.com>
Date: 1996/04/29
Message-ID: <4m2ibd$5cp_at_inet-nntp-gw-1.us.oracle.com>#1/1


Wilfred Ng <siuhungn> wrote:

>Hello,
 

>I find that it is impossible to use >, <, => or =< to compare
>tuple projections greater than 1. For example, (Att1, Att2)>((1,2)).
>However, in the Oracle manual(v6), it states that the comparsion
>more than 1-arity is allowed such as (A,B)> all((1,2),(3,1)).
>The comparsion will do according to lexciographical ordering. Anybody
>can help?
>

Is (1,2) >= (2,1)????

What would it mean to compare these two projections? Should they be considered vectors and compare the magnitude (if so, perform the math and compare the scalar results).

In the manuals (i don't have a version 6 one sitting around), they describe that:

 a > all( d,e,f,g,h )

is valid, but (a,b) > all( (d,e), (f,g) )

would not be.

>In fact it works fine for equality comparsion, say, (Att1, Att2) = ((1,2)).

(1,2) = (1,2) would be true. (1,2) > (1,2) is not known however, the operators such as >, <, etc need scalars to compare with. > does not make sense with a multi-column projection.

>Cheers,
>Wilfred.

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government



opinions and statements are mine and do not necessarily reflect the opinions of Oracle Corporation. Received on Mon Apr 29 1996 - 00:00:00 CEST

Original text of this message