Error in Sql when use union

Hi,

I am using advance sql and using union for greeting record Counts.

but i am unable to run it getting error


Can anyone help me.


Regards

Piya

mvp_badge
MVP
Solution

Hi Piya,

whenever use Union or union all-

1. the selection of attributes  must same 

2. you are using three select query and must have same count of attribute.

in your sencond query you missed one attribute-

there is only two attributes/Columns

use 

Select count(1),'Risk',0 from {Risks}


Hope this will help you.

Regards

Rahul

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.