Combination of more/less and brackets cause TRUE or FALSE (merged 2) [message #666074] |
Thu, 12 October 2017 03:21 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/83406383015e9e3183170b0755c9b9ac?s=64&d=mm&r=g) |
isri
Messages: 16 Registered: November 2012
|
Junior Member |
|
|
Hello,
I found that different combinations of more/less sign (<>) and brackets as strings cause statement appears TRUE or FALSE:
< with { gives TRUE while with ( gives FALSE
> with { gives FALSE while with ( gives TRUE
-- results <= {
WITH CAL AS(
SELECT
TO_CHAR( LEVEL ) n
FROM
DUAL CONNECT BY LEVEL <= 2
) SELECT
*
FROM
CAL
WHERE
n <= '{';
-- no results >= (
WITH CAL AS(
SELECT
TO_CHAR( LEVEL ) n
FROM
DUAL CONNECT BY LEVEL <= 2
) SELECT
*
FROM
CAL
WHERE
n <= '(';
-- results >= )
WITH CAL AS(
SELECT
TO_CHAR( LEVEL ) n
FROM
DUAL CONNECT BY LEVEL <= 2
) SELECT
*
FROM
CAL
WHERE
n >= ')';
-- no results >= }
WITH CAL AS(
SELECT
TO_CHAR( LEVEL ) n
FROM
DUAL CONNECT BY LEVEL <= 2
) SELECT
*
FROM
CAL
WHERE
n >= '}';
Could anyone help with explaining that?
Many thanks and regards
|
|
|
|
|
|