I have two select statements . I want to combine the results of these two select statements.
I tried UNION and I am getting this error "Conversion failed when converting the varchar value 'n' to data type int".
Is there any way I can combine these two statements.
Below are the two statements:
- SELECT Descr,FilterA,FilterB,FilterC,CreateDate from X JOIN Y on Y_ID = X_ID WHERE Label IN ('111','222','333')
- SELECT Label, COUNT(Label), FROM X JOIN Y on Y_ID = X_ID WHERE CreateDate >= DATEADD(day, -7, GETDATE()) AND Label IN ('111','222','333')
GROUP BY Label