Home > Blockchain >  Getting 'ORA-00907: missing right parenthesis' when I copy code from Oracle SQL Dev into T
Getting 'ORA-00907: missing right parenthesis' when I copy code from Oracle SQL Dev into T

Time:07-08

As stated in the title, I'm getting an error when I copy the below code into Tableau - 'ORA-00907: missing right parenthesis'. Extremely weird since there are no parentheses at all in my code, which is simply pulling out a subset of columns and rows from a large table. The code works fine in Oracle SQL Developer... any ideas?

SELECT f.gl_date_revenue, f.gl_date_cogs, f.bill_to_customer_id, f.ship_to_customer_id, f.inventory_item_id, f.sob_currency_code, f.sob_extended_amount, f.usd_extended_amount, f.units, f.country_name, f.territory
FROM my_schema.my_table f
WHERE f.territory = 'Nordic';

CodePudding user response:

Debug your code:

  1. Remove anything unnecessary.

    In this case, you can remove the table alias and the trailing semi-colon:

    SELECT gl_date_revenue, gl_date_cogs, bill_to_customer_id, ship_to_customer_id, inventory_item_id, sob_currency_code, sob_extended_amount, usd_extended_amount, units, country_name, territory
    FROM my_schema.my_table
    WHERE territory = 'Nordic'
    
  2. Remove necessary code until your code works.

    • Remove the WHERE clause, does it work?
    • Remove columns until it works.
    • Put columns back one-by-one until you find the column that breaks it.
    • Read the tableau documentation to see if that column name has any special meaning.
  • Related