Forum Discussion
Query with CTE gives error
One more thing...though I can see my data under "Edit Queries", I cannot create a visualization because the query doesn't appear under "Fields".
- austinsense10 years agoImpactful Individual
Are you accessing a view that uses a CTE or did you write a SQL query that uses a CTE?
If it's the latter, then I'd suggest creating a view and then querying the view.
- michaeljc7010 years agoAdvocate II
I wrote a query that uses a CTE. I don't have permissions to create a view or stored procedure.
- austinsense10 years agoImpactful Individual
Gotcha, putting a custom sql query into the query builder is not recommended - as you can see :smileyhappy:
Here are your options ...
1. Create a view - sounds like this isn't an option for you
2. Re-write the query without using a CTE - that would be a good test of your SQL skills
3. Stop using the custom sql code, query the underlying tables using the GUI, and use PQ to create the output you want - that would be a good test of your PQ skills