[Solved] Report not reflecting query

Discuss the database features
Post Reply
pizzipie
Posts: 54
Joined: Sat Sep 13, 2008 2:28 am

[Solved] Report not reflecting query

Post by pizzipie »

Hi,
Hi, I'm using Libre with Ubuntu 14.04:

Version: 5.0.5.2
Build ID: 55b006a02d247b5f7215fc6ea0fde844b30035b3
Locale: en-US (en_US.UTF-8)

I have this query:

Code: Select all

SELECT DISTINCT "id", "player", "playdate", "score" FROM "bridge"."bdata" AS "bdata" WHERE "playdate" = '2017-01-02' ORDER BY "score" DESC LIMIT 6


Running the query works fine and I get 6 records out of 8 being displayed in DESC order.

When I run the report, supposedly using this query, I get all 8 records. If I use LIMIT 0,6 I get the following error:

SQL Status: HY000
Error code: 1000
Syntax error in SQL statement

Any clue as to why this happens and how to fix it?

Thanks R
Last edited by Hagar Delest on Thu Jan 05, 2017 9:38 am, edited 1 time in total.
Reason: tagged [Solved].
Libre Office Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.10
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Report not reflecting query

Post by Villeroy »

Try switching to "direct SQL" mode. With the query opened in SQL view, turn on menu:Edit>Run SQL directly and save the query.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Nocton
Volunteer
Posts: 533
Joined: Fri Nov 05, 2010 10:27 am
Location: UK

Re: Report not reflecting query

Post by Nocton »

Or try creating a 'View' table and run the report from that.
OpenOffice 4.1.12 on Windows 10
pizzipie
Posts: 54
Joined: Sat Sep 13, 2008 2:28 am

Re: Report not reflecting query

Post by pizzipie »

[SOLVED]

Thanks Nocton,

I did create a view and it works fine.

Thanks Villeroy,

I tried your suggestion and it works fine. This seems to be the fix, not a work around.

R
Libre Office Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.10
Post Reply