Hmmm, this does not seem to be a BETWEEN issue, since it also fails with
ZEILE_RELATIV >=16 AND ZEILE_RELATIV <= 18
On 2014-12-03 05:21 PM,
christof...@finaris.de wrote:
> Hi,
>
> The following statement returns 0 rows as result, obviously, the result should be one row containing the value 17:
>
> *SELECT
> *ZEILE_RELATIV*
> FROM
> **(
> **SELECT
> *ZEILE_RELATIV
> *FROM
> **(
> **SELECT **16 **AS *ZEILE_RELATIV
> *UNION ALL
> SELECT **17 **AS *ZEILE_RELATIV
> *UNION ALL
> SELECT **18 **AS *ZEILE_RELATIV
> *UNION ALL
> SELECT **19 **AS *ZEILE_RELATIV
> *)
> **WHERE
> *ZEILE_RELATIV *BETWEEN **16 **AND **18
> **) **
> WHERE
> *ZEILE_RELATIV *= **17*
>
> The same query using an equivalent IN clause works as expected (1 record as result):
>
> *SELECT
> *ZEILE_RELATIV*
> FROM
> **(
> **SELECT
> *ZEILE_RELATIV
> *FROM
> **(
> **SELECT **16 **AS *ZEILE_RELATIV
> *UNION ALL
> SELECT **17 **AS *ZEILE_RELATIV
> *UNION ALL
> SELECT **18 **AS *ZEILE_RELATIV
> *UNION ALL
> SELECT **19 **AS *ZEILE_RELATIV
> *)
> **WHERE
> *ZEILE_RELATIV *IN **(**16*,*17*,*18**)
> ) **
> WHERE
> *ZEILE_RELATIV *= **17*
> www:
http://www.finaris.de <
http://www.finaris.de/>und
http://www.rapidrep.com <
http://www.rapidrep.com/>
>
> ================================================================================================================
> Disclaimer
> The information contained in this e - mail and any attachments ( together the "message") is intended for the addressee
> only and
> may contain confidential and/or privileged information. If you have received the message by mistake please delete it and
> notify
> the sender and do not copy or distribute it or disclose its contents to anyone.
>
> FINARIS Financial Software Partner GmbH, Sömmerringstr. 23, 60322 Frankfurt/Main, Germany
> Registered at Frankfurt/Main, HRB 52873, Managing Directors: Dipl. Inf. Hermann Friebel, Dipl. Ing. Kai Bächle, Dipl.
> Inf. Werner Märkl
> ================================================================================================================
>