I have a table in sql 2008 named tblEmployeeAttendance like

Here is some dummy data for a employee’s one days attendance like

Here AI refers AttendanceIn,AO refers AttendanceOut,BO refers BreakIn and BI refers BreakOut.There can multiple row in a day for a employee.First row should be AI,last row should be AO and others rows will be BreakIn,BreakOut Sequentially(that means BreakIn-BreakOut-BreakIn…..).
My expected output would be like this

I need a sql query that will return one row per date and return data that must contain AttendanceIn and AttendanceOut Time depands on strRemark(AI & AO). Please help me.
You probably dont need the AI and AO checks as the time will always be at opposite ends of the day.