Reputation: 13
I have added the query using with to retrieve multiple set of data from various table. But the simple, with query not even executing in DBeaver. I don't know why it is returning
"SQL Error [42P01]: ERROR: relation "loc_cust_fields" does not exist Position: 27"
Here is my query, I don't know what I did wrong. I'm working on the client database server. Is database server has any restrictions? But their query is running with WITH function Please give me suggestion.
with
loc_cust_fields as
(
select identifier from job_base
)
select jb.identifier from loc_cust_fields as jb
Upvotes: 1
Views: 1291
Reputation:
Your query is valid SQL.
It might be possible that DBeaver treats empty lines as statement separators, so the WITH part and the SELECT part are run as two different statements.
Try to remove the empty line after the closing )
from the common table expression.
Upvotes: 4