using ms sql server, migrating query that pulls data from various tables. There is no joins , only union all.
It still gives me the error, even though i explicitly tr