<pre lang="xml">
select Read_P,Write_P, Update_P, Delete_P from MenuMapping where RoleName=@RoleName and SubMenuId in (select SubMenuId from SubMenu where SubMenuLcation=@SubMenu)
</pre>
there should be 'in' not '=' near to 'SubmenuID in (query)' reason your subquery is contain more than one row so db is confuse which row it has to take, after putting in it will consider all row to check and give you result for all matching result for your subquery