列名 'SP' 无效。
select COUNT(1) from (select * from (select m.*,ui.userId,ui.attribute,ui.birthday,ui.company,ui.explain,ui.sex,ui.IDCard,ui.KQ,ui.location,ui.name,ui.nationId,ui.provinceId from [dbo].[BUG51_UserMain] as m inner join [dbo].[BUG51_UserInfo] as ui on m.id=ui.userId) TP1 where 0=0 and Tp1.SP = 'A' and TP1.name<>'') T where 0 = 0