please see the attached spreadheet which shows
fig 1. current output from tbl_marks (select * from tbl_marks where stud_id = 222648)
this table records student attendance over the academic year. both morning (AM) and afternoon (PM) marks are recorded (so there are two characters for each day). there are around 730 characters in each mark string (365 days * 2)
fig2. desired output 1
each students daily attendance on one row (AM mark and PM mark).
fig2. desired output 2
each students morning and afternoon attendance on a separate row .
any help to write both queries is appreciated.