79634477

Date: 2025-05-22 20:21:50
Score: 1
Natty:
Report link

I had a similar issue. The cause was the multiple subqueries within a UNION statement. Somehow, one of the subqueries was out of order in the first part of the UNION and that caused the statement to attempt to UNION the two fields that were different data types.

There was several hundred lines of code already in the statement so, it made it a bit challenging to find where the subqueries were out of order. Once the offender was located, it was placed in the correct order so that the portions of the UNION statement that it was attempting to union weren't trying to UNION two different data types.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Phil Parks