i am having a problem in sqlserver query,i am developing leave application on web,i used to store all the leave details to the particular employee,for example if the user wants to enter the leave information of the particular user,the user wil select the employee id and specify the type of leave in dropdown and no of days in textbox it will be saved in the database,i retrived the record of the particular user,if the same user wants to take leave it will be saved in the database,just i want to display all the leave type of the particular empid,
if the user want to check the leave how many days he will take the leave just i want to display all the leave types in the webpage and display the totleave of the particular employee how.
THIS IS my table leave type sl,cl,pl just i want to show all the leave types,and should display the total cl days and total sl days and total pl days,,
empid sl cl pl
OPD1 2 0 0
OPD14 0 0 2
OPD11 0 1 0
OPD11 0 1 0
OPD2 2 0 0
OPD11 2 0 0