In this blog post, let’s learn about the error message “308 Corresponding column types must be compatible for each UNION statement.” in Hydra and the description of the error.
Error Message
308 Corresponding column types must be compatible for each UNION statement.
Error Details
All rows produced in a union of SELECT statements must have the same format, so the corresponding columns for each UNION statement must have the same data type or compatible data types. Two data types are compatible if you can convert one of them into the other; for example, int and float are compatible data types because you can convert int values to float values. In the current statement, a column in the second or subsequent SELECT statement does not agree with the corresponding column in a preceding SELECT statement.
Review and compare all the SELECT statements. Check each point at which one statement selects a column that is not identical to a column in the preceding SELECT statement. If the column data types do not match, then one type must be convertible to the other type.
Leave a Reply