Error "[SQLSTATE:42601] 'case' requires uniform result types in THEN clauses"

Published: 16 Jun 2022
Last Modified Date: 16 Jun 2022


When using an extract as the data source for a view, the following error may occur:

Error Code: A5A4A0B1
[SQLSTATE:42601] 'case' requires uniform result types in THEN clauses:
<X>, column <Y>: ... COLLATE "binary"...


  • Tableau Desktop


If the objective of changing the data source to an extract is to create a .twbx for sharing, or to publish the workbook to Tableau Public, try this workaround:
  1. Open the working version of the Tableau workbook that connects to the live data source.
  2. Export the data from the live data source to a .csv file: On the Data Source page, select Data > Export Data to CSV to export all the data in your data source to .csv file. See Export your data to .csv file for more information.
  3. Replace the live data source with the .csv file as a new data source. For instructions, see:
Did this article resolve the issue?