I’m recreating a database and wanting to re-use some of the queries that other people helped me create with sql. To get rid of repeated varchar values I made one table into two with new names and the a query with the same name as the original table and all of the same fields.
When I tried to use the old query on the new query I got this error:
The data content could not be loaded. at ./connectivity/source/commontools/dbtools.cxx:746
SQL Status: 42501
Error code: -5501user lacks privilege or object not found: annual_cultivation at ./connectivity/source/drivers/jdbc/Object.cxx:173
In the original databse, annual_cultivation was a table. Now it is a query.
This is the query that I’m trying to reuse
SELECT "latin_name", "start_month", "start_day", "end_month", "end_day", "practice", "detail","phenological_event" FROM "annual_cultivation" WHERE "start_month" IS NOT NULL
union all
SELECT "annual_cultivation"."latin_name", "phenology_dates"."start_month", "phenology_dates"."start_day", "phenology_dates"."end_month", "phenology_dates"."end_day", "annual_cultivation"."practice", "annual_cultivation"."detail","annual_cultivation"."phenological_event" FROM "annual_cultivation", "phenology_dates" WHERE "annual_cultivation"."phenological_event" = "phenology_dates"."phenological_event" AND "annual_cultivation"."phenological_event" IS NOT NULL
ORDER BY "end_month" ASC, "end_day" ASC, "start_month" asc, "start_day" ASC`Preformatted text