Bug 155751 - dBase: BETWEEN won't include first and last value in queries
Summary: dBase: BETWEEN won't include first and last value in queries
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Database-Queries
  Show dependency treegraph
Reported: 2023-06-09 09:48 UTC by Robert Großkopf
Modified: 2023-08-14 13:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:

Extract the *.zip and start the database file … (2.55 KB, application/zip)
2023-06-09 09:48 UTC, Robert Großkopf

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2023-06-09 09:48:43 UTC
Created attachment 187802 [details]
Extract the *.zip and start the database file …

Download the attached *.zip-file.
Extract and start the database file. Hope the connection to the dBase-file will work.
Start the query.
It will show "ID" starting with 2, ending with 9.
Close the query, open the query for editing (will only work opening in SQL-mode).
Have a look at the code:

BETWEEN should start with '1' and end with '10'.
If you execute BETWEEN in internal HSQLDB and Firebird it will do so. 
For dBase connections it will exclude start value and end value.

BETWEEN should give the same result as
SELECT "ID" FROM "table" WHERE "ID" >= 1 AND "ID" <= 10

This bug appears on all LO-versions here (oldest here: LO It appears also on AOO 4.1.8. Think it has been inherited from OOo.

See also:
Comment 1 Buovjaga 2023-08-14 13:18:49 UTC

Arch Linux 64-bit, X11
Version: (X86_64) / LibreOffice Community
Build ID: 518fa99dd7693d64a53e404a065090aedc0002b1
CPU threads: 8; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 14 August 2023