Greetings all!
I’ve been running into the Schema “db_username” does not exist error when query a Derby embedded db.
I’ve done some research and and it happens only in views, if I understand correctly
(Reference: http://www.jroller.com/gmazza/entry/apache_derby_sql_state_42y07)
I’m very unfamiliar with Derby, and still rather green with SQL too, most likely, and am not even trying to create as view AFAICT.
My query is this:
select APP.dossiers.id, APP.identifiants1.nom, APP.identifiants1.prenom, APP.identifiants1.no_civique || ', ' || APP.identifiants1.rue as adresseid1,
APP.identifiants1.appartement, APP.identifiants.nom, APP.identifiants.prenom, APP.identifiants.no_civique || ', ' || APP.identifiants.rue as adresseid2, APP.identifiants.appartement
from APP.dossiers
right join APP.identifiants as identifiants1
on identifiants1.id = dossiers.id1
left join APP.identifiants
on identifiants.id = dossiers.id2
Originally, the selected columns didn’t have APP. prefixing them, yet after adding it I still got the error (that’s when I’ve done the research).
In light of the result of my research, I’ve concluded that
right join APP.identifiants as identifiants1
may be choking the whole thing.
Thus I have modified the query like so:
select APP.dossiers.id, APP.identifiants1.nom, APP.identifiants1.prenom, APP.identifiants1.no_civique || ', ' || APP.identifiants1.rue as adresseid1,
APP.identifiants1.appartement, APP.identifiants.nom, APP.identifiants.prenom, APP.identifiants.no_civique || ', ' || APP.identifiants.rue as adresseid2, APP.identifiants.appartement
from APP.dossiers
right join APP.identifiants as APP.identifiants1
on identifiants1.id = dossiers.id1
left join APP.identifiants
on identifiants.id = dossiers.id2
and get the following error (line 3 being 4 in the pasted code)
Error code 30000, SQL state 42X01: Syntax error: Encountered "." at line 3, column 35.
Line 1, column 1
Execution finished after 0 s, 1 error(s) occurred.
I’m sort of convinced it’s just a stupid problem. Maybe some bracketing required like in “Ms Access” databases?
Perhaps I’m not even on the right path?
Any help I can get on this is appreciated.
I will keep on :headbang: on this in the mean time, of course.