Skip to main content

Error with Sybase connection.

Used the below calculation and it is working in Tableau Desktop and throwing error in Tableau server.

REPLACE((REPLACE([Cusip Number],"'", "%27")),",", "%5C%2C")

[SAP][ASE ODBC Driver][Adaptive Server Enterprise]Incorrect syntax near the keyword 'REPLACE'.

2 Antworten
  1. 17. Juni 2023, 15:33

    Hello!

     

    The error message indicates that there is an issue with the syntax of the REPLACE function in your Sybase connection. The error is specific to the ASE ODBC driver and suggests that the REPLACE function is not supported or recognized in the context of your query.

     

    One possible solution is to modify the calculation to use a different function that is compatible with the ASE ODBC driver. Here's an alternative approach using the TRANSLATE function, which can achieve the same result:

     

    TRANSLATE(TRANSLATE([Cusip Number], "'", "%27"), ",", "%5C%2C")

     

    The TRANSLATE function replaces specified characters in a string with corresponding characters from another string. In this case, it replaces single quotes (') with "%27" and commas (,) with "%5C%2C".

     

    Try using this modified calculation in your Tableau Server connection and see if it resolves the error.

     

    If you found this answer helpful, please kindly consider marking it as the best solution. Your feedback is highly appreciated!

     

    Best regards,

     

    Kapil Jindal

    BI Analyst at Novo Nordisk, Bangalore

    Tableau Desktop Certified Professional