In this blog post, let’s learn about the error message “317 Must have the same number of selected columns in each UNION element.” in Hydra and the description of the error.
Error Message
317 Must have the same number of selected columns in each UNION element.
Error Details
All rows that are produced in a union must have the same format, so each SELECT statement in the union must select the same number of columns. In this union, one of the second or subsequent SELECT statements does not list the same number of columns as the preceding one. Review the entire union, and check that all select lists are alike in number and data type. If no appropriate column exists for one of the statements, specify a literal value of the appropriate type at that position. For example, where you need to match a numeric column, specify a literal zero.
Leave a Reply