Replies: 2 comments 5 replies
-
I see no column |
Beta Was this translation helpful? Give feedback.
1 reply
-
What is the error you get? IIRC, LibreOffice Base does some syntax conversion itself for compatibility with the HSQLDB syntax, and this sometimes stumbles. IIRC, you may need to check the "Run SQL command directly" option to avoid this translation. But as Vlad indicated, your reproduction example is incomplete. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Some Background Info:
I'm using LibreOffice Base 25.2.1.2 Flatpak in Experimental mode using Firebird on Arch Linux
(Because I couldn't find a way to do string concatenation, or in any way nicely organize the data the way I needed in HSQLDB)
I've got two tables, one called "Job Details" which holds a Job ID (PK), and relevant info, and one called "Materials" With ItemID (PK), Job ID (Job Details.Job ID FK), Vendor (VARCHAR(100)), Description, and Cost Columns. For each Job, all purchases made for the job are to be entered into Materials, with the Job ID referencing the Job it was purchased for.
The Problem:
I'm working on a Query to nicely concatenate the data for a report, all material Descriptions and Cost under the same Job ID are turned into a nice list in one entry, and the Vendors, which can repeat, I want to be listed such that they do not repeat. Every scrap of documentation I can find says that I can use SELECT ... LIST(DISTINCT Vendor), but i've tried in every way I can think of and adding DISTINCT always gives me a generic non-specific error. If i switch it to COUNT(DISTINCT Vendor) It works, but List, documented as accepting DISTINCT in version 3, 4, and 5, doesn't seem to? How can I fix this, or circumvent the issue? Here is my SQL for this Query
SELECT "Job ID", LIST(DISTINCT "Vendor" , ASCII_CHAR( 10 ) ) AS "Vendors", LIST("Item Description" || ': ' ||'$'|| "Item Cost", ASCII_CHAR( 10 ) ) AS "Items"
FROM "Materials"
GROUP BY "Job ID"
ORDER BY "Job ID" ASC
EDIT: Just confirmed this is Firebird 3.0.7
Beta Was this translation helpful? Give feedback.
All reactions