Hi Ratslinger, thank you for the response. I’m still struggling with this one. I am getting an error that says the following:
The data content could not be loaded. /home/buildslave/source/libo-core/connectivity/source/commontools/dbtools.cxx:751
Column not found: Location in statement [SELECT “Region”.“RID”, “RID”.“Location” (…and it goes on to list the whole query) The error ends with: /home/buildslave/source/libo-core/connectivity/source/drivers/jdbc/Object.cxx:175
I think the issue is that I have a field called “Location” in both tables, so I took the steps to specify the table names in the query to try solving the above error. That didn’t work.
I then created new tables with your exact info, but used rlocation and tlocation. The Query worked perfectly. Then when I changed rLocation and tLocaiton to match as Location, the query stopped working. Even when specifying the table name first.
Here is what I entered:
SELECT "Region"."RID",
"Region"."Location",
SUM( "Transactions"."Cost" )
FROM ( SELECT *
FROM "Transactions"
LEFT JOIN ( SELECT * FROM "Region" ) "A"
ON ( "Transactions"."Location" = "Region"."Location" )
AND ( "Transactions"."Purchase Date" BETWEEN "Region"."Start Date"
AND "Region"."End Date" ) )
GROUP BY "Region"."RID",
"Region"."Location"
Do I need different field names to get this to work? Thanks!