hi....
i am using sqlserevr 2000
my problem is
i want to count the distinct values in a row
create table counting(id int identity(1,1),[name] varchar(20),c1 varchar(10),c2 varchar(10),c3 varchar(10),[count] int default 0)
insert into counting([name],c1,c2,c3) values(aravind,AA,BB,CC)
insert into counting([name],c1,c2,c3) values(aravd,AA,AA,DD)
insert into counting([name],c1,c2,c3) values(avid,AA,AA,AA)
insert into counting([name],c1,c2,c3) values(a,AA,B,BB)
insert into counting([name],c1,c2,c3) values(arnd,EE,FF,JJ)
now i want to count the distinct values from c1,c2,c3 of one row
for example for row 1 count=3
for row 1 count=2 without using temp table
thanks in advance