Knowledge base

Analytics query errors: SELECT * fails, "This operation is not permitted in the query", renaming columns

List every column instead of SELECT *, rewrite CTEs as inline subqueries, and rename columns with AS.

Fix

Short answer: The dataview editor doesn't accept SELECT * or WITH (CTE) clauses. Name every column, move CTEs into inline subqueries, and use AS to rename columns.

Why it happens

  • The dataview query editor doesn't support the asterisk for selecting all columns.
  • Some SQL operations, such as CTEs, are blocked. The error message doesn't say which one.

How to fix it

If SELECT * fails:

  1. List each column. For example: SELECT "Name", "Reporting_Manager", "_created_by.Name" FROM "Asset_Request_123".
  2. Drag column names from the schema browser into the editor to save typing.

If you see "This operation is not permitted in the query":

  1. Look for a WITH … AS (…) block, a SELECT * or table.*, a table name with a database or schema prefix, or more than one statement.
  2. Remove that part, or move each CTE into the FROM clause as an inline subquery, then run the query again.

To rename a column, use AS, for example "Emp_Code" AS "Code".

Dataview query editor with columns renamed using AS and the query result below

If you see that a table "does not exist", check the spelling and case of the data source name. Dataview queries are case-sensitive, and table names use underscores, for example Purchase_Request.

If you see "You don't have permission to access this resource" and you aren't a Super Admin, you don't have access to a table or system table the query uses. For a system table, ask a report admin of that table to add you through Share. For a process, board, dataset, or dataform table, you need a role on the flow that gives you access. Super Admins can query every table and system table without being added to them. For anyone, including Super Admins, the message can also mean the query uses a dataview that is itself built on another dataview.

If you see "Query execution failed":

  1. Check whether the same table fails in other dataviews.
  2. If it does, contact Kissflow support with the dataview URL.

See using the dataview query editor.

Related answers