I've got a table employee_hourscreate table employee_hours (employee_id int,charge_code varchar(20),charge_date datetime,hours numeric(5,1),billable bit)
that keeps track of employee hours and whether or not the time charged is billable.now assume that there is the following data in the tableemployee_id|charge_code|charge_date|hours|billable1999|ABC123|12/1/2007|2.0|11999|DEF123|12/1/2007|2.0|11999|EFG123|12/1/2007|2.0|01999|EFS123|12/1/2007|2.0|0I would like to make a select statement that gave me the following columns in a single row.employee_id|charge_date|billable_hours|non_billable_hours|total_hours1999|12/1/2007|4|4|8Any assistance would be greatly appreciated. I can't seem to get any amount of joins or group bys to work for me the way i need it. I'm using SQL Server 2000 if that matters.