Quantcast
Viewing all articles
Browse latest Browse all 75

Union CTE's with different # of Columns

I'm trying to do a union of two CTE's. The first CTE has 7 columns and the other one has only 6 columns. I tried to pad it, but I invalid column name and not a defined system type.

This is what I did convert(dest, varchar, null)

Dest is the column in the first CTE that isn't in the 2nd CTE.


Viewing all articles
Browse latest Browse all 75

Trending Articles