0

I see an error

[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near ';'.
[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near ')'.

when trying to run the following on Custom SQL on Tableau Desktop

SELECT SbjNum,
  indicatorname,
  indicatorvalue
FROM
    stg_a1ee6_4c7096aa_1
CROSS apply
    (
        values
('Q1_1', Q1_1),
('Q1_2', Q1_2),
('Q1_3', Q1_3),
('Q1_3OE', Q1_3OE)
) c (indicatorname, indicatorvalue);

I am unable to find where the syntax is wrong

Jens
  • 67,715
  • 15
  • 98
  • 113

1 Answers1

0

Tableau will not like the semi-colon. Try removing it.

If that doesn't work, copy and paste it into SQL. Does it work?

I don't see an issue with your parentheses (every open seems to have a close). It may be easier to find this problem in SQL SSMS.