I have a union query that was working fine until I added one field. That's all I'll show here to simplify:
Select
Null as RenderHere
From
Where
Union All
Select
ppm.attending_ind as RenderHere
From
Where
I get the error: Syntax error converting the varchar value 'Y' to a column of data type int.
Both sides of the query work independently but together I get that error.
For the second half I tried: convert(varchar(1), ppm.attending_ind) as RenderHere
but I still got the same error. So I even tried: convert(varchar(1), Null) as RenderHere on the top half but I still get the same error.
The field is a char(1) so I tried converting to that too but I get the same error.
Any ideas? Thanks
Select
Null as RenderHere
From
Where
Union All
Select
ppm.attending_ind as RenderHere
From
Where
I get the error: Syntax error converting the varchar value 'Y' to a column of data type int.
Both sides of the query work independently but together I get that error.
For the second half I tried: convert(varchar(1), ppm.attending_ind) as RenderHere
but I still got the same error. So I even tried: convert(varchar(1), Null) as RenderHere on the top half but I still get the same error.
The field is a char(1) so I tried converting to that too but I get the same error.
Any ideas? Thanks