2189 Inconsistent number of columns in the result sets participating in the UNION statement

Advantage Error Guide

Problem: The individual queries in the UNION statement do not return the same number of columns in the result set. The queries in the UNION statement must contain the same number of columns in the result set. For example, "SELECT Lastname FROM table1 UNION SELECT lastname, firstname FROM table2" is not valid because the second SELECT returns 2 columns in the result set while the first SELECT returns only 1 column in the result set.

Solution: Adjust the SELECT clauses in the UNION statement so they all return the same number of columns.