Working through ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.

Reply
New User
Posts: 1

Working through ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.

Hi All - I am receiving the following error:

ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.

The problem is, how can I find out which When clause is the culprit?  There are many when clauses in my query...

Thanks!

Super User
Posts: 19,789

Re: Working through ERROR: Result of WHEN clause 2 is not the same data type as the preceding results.

That is annoying.

Without knowing more about what your doing - a binary search is possible.

Comment out half of when clauses and run code. If you get the error its in the section that's uncommented. Repeat until it's narrowed down.

Ask a Question
Discussion stats
  • 1 reply
  • 763 views
  • 0 likes
  • 2 in conversation