1
我在查询中有下面的case语句。基于Case语句的组
case when ID is null then case when netID is null then [text]
when netID is not null then 'UnAssigned' else ID End
else ID end grp
我想分为2类1)从[文本]列中填充的所有记录。 2)remaning 任何想法?有人能指出我的正确方向吗?
你的意思是像“GROUP BY CASE WHEN ID为null,并且NetID为空然后1其他0结束“ – StrayCatDBA 2013-04-08 19:18:14
雅试图说明它没有正确分组.. .. – user1046415 2013-04-08 19:25:16
嗨@user,我试着重新格式化您的示例代码,但它没有任何意义。你有2个'case',但只有1个'end'。请添加另一个'end'? – PowerUser 2013-04-08 19:51:26