Search code examples
sqltableau-apiwindow-functionsverticarow-number

SQL Vertica on Tableau: row_number over partition by multiple fields error


I have a query that uses

row_number() over(partition by a,b)

When I run the query in dbvisualizer, it runs fine. When I try to use it as a custom SQL query in Tableau, it throws the error:

Error 3537: Incorrect number of parameters for prepared statement _PLAN000011EBDD67590_42

Any idea what I should do? I need my data partitioned by both a and b but Tableau just isn't happy with it.


Solution

  • It's very probably not the ROW_NUMBER() function that perplexes Tableau. "Incorrect number of parameters" usually means that you have a different number of parameter markers in a query that contains for example WHERE purchase_date = ?, and you maybe try to pass two values in a filter of your report.

    I would check for the query that Tableau wants to send in detail, and look at the filter you are using to find inconsistencies .