asp.net - Fetch Weekly Data By Query in Sql Server -
i have table name 'emp_attendance_new' kept record of emp attendance.when fire query give particular result.
query:
select atendencedate ,emp_id,attendance_status ,empname emp_attendance_new emp_id ='20140160' , atendencedate between '3/30/2015' , '4/5/2015'
result:
atendencedate emp_id attendance_status empname 2015-03-30 20140160 p vikash prasad 2015-03-31 20140160 p vikash prasad 2015-04-01 20140160 p vikash prasad 2015-04-02 20140160 p vikash prasad 2015-04-03 20140160 p vikash prasad 2015-04-04 20140160 p vikash prasad
but want result in single row this:
emp_id empname 2015-03-30 2015-03-31 2015-04-01 2015-04-02 2014016 vikash prasad p p p p
Comments
Post a Comment