Click here to Skip to main content
15,890,670 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello i have one query
I have one table programer and its fields are
pname
proficiancy1 and
proficiancy2

and i want the data from this table that
count the number of prohramer whose proficeancy1 = c or proficiancy2=c

I fire the count query in that but on saprare column and retrive 2 different count but i want only one count as output how to do?
Posted

1 solution

How about using a where clause?

SQL
SELECT COUNT(p.pname)
FROM programmer as p
WHERE  
    p.proficiancy1 = c OR p.proficiancy1 = c  


Since I have no clue from the little that your question contained I can not really say what c is supposed to be since you didn't take care to tell us what type the "proficiency" fields are made of. BTW, you also forgot to tell us the kind of RDBMS you are using. Your tag "ASP.net" doesn't really help either.

Regards,
— Manfred
 
Share this answer
 
Comments
An@mik@ 29-Sep-13 15:04pm    
ok i forgot to tell but i solve that problem . thank you: :-)
Manfred Rudolf Bihy 29-Sep-13 15:15pm    
Interesting, your question was posted 34 minutes ago and my response was posted 21 minutes ago.
For the sake of all other enquirers you might want to modify your question to show what you did to achieve your goal.
Thank you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900