问Count?该如何解决

问Count?
有一条SQL:select   count(distinct   a,b,c,d)   from   A.
执行出错,distinct中只有一个字段是执行成功。
现在不能用子查询如:select   count(*)   from   (select   distinct   a,b,c,d   from   A)
请问有没有什么其他办法解决?

------解决方案--------------------
try:
select count(distinct a+ '| '+b+ '| '+c+ '| '+d) from A
------解决方案--------------------
学习了!
------解决方案--------------------
有~~你==
------解决方案--------------------
一下这么多人啦~~~算啦算啦~~~
------解决方案--------------------
use pubs
go

select distinct emp_id, fname, minit, lname
from employee
where fname = 'Aria '

select count(*) as [count]
from ( select distinct emp_id, fname, minit, lname
from employee
where fname = 'Aria ')
as a

--Result

emp_id fname minit lname
--------- -------------------- ----- ------------------------------
A-C71970F Aria Cruz

(1 件処理されました)

count
-----------
1

(1 件処理されました)

==我觉得楼主的代码有点小问题而已
select count(*) from (select distinct a,b,c,d from A)
==〉

select count(*) from (select distinct a,b,c,d from A) as B
这样可能就对了

------解决方案--------------------
select count(distinct a,b,c,d) from A.
这条语句是错误的,COUNT不能这样用
select count(*) from (select distinct a,b,c,d from A)
这条也是错误的,如果在子查询后面加个别名,如下:

select count(*) from (select distinct a,b,c,d from A) b
应该没有问题了



------解决方案--------------------
select count(*) from (select distinct a,b,c,d from A) tt
这样就可以了.
不是不能这样写,而是写的不对,子查询需要有别名的呀.