KNOWLEDGE BASE

Error: "ora-00907: missing right parenthesis" upon running Custom SQL


Published: 15 Dec 2017
Last Modified Date: 29 Jul 2021

Issue

Upon running a customer SQL in Tableau Desktop or Tableau Prep Builder the error below occurs:
"Oracle database error 907:ORA-00907: missing right parenthesis"

Environment

  • Tableau Desktop
  • Tableau Prep Builder
  • Oracle

Resolution

Check the syntax and try removing the semi-colon at the end of the query, if there is one.

Cause

Stray semi-colon causing syntax error in Customer SQL.

Additional Information

The Custom SQL examples in the Product Guide section below do not show semi-colons: 
Connect to a Custom SQL Query 
 
In terms of testing Tableau's Custom SQL queries in other tools, it is important to note that Tableau Desktop wraps Custom SQL queries in a Select statement. The query Tableau Desktop usually sends looks like this: 

SELECT * 
FROM 
(CUSTOMER'S CUSTOM SQL goes here, inside the parentheses
Did this article resolve the issue?