As captioned, I would like to check whose records of award, OLE or external participation have the print sequence NOT set. I can ask the respective students to do their job if I have the list of students concerned. Thank you very much!
Pls try the below SQL, it can extract missing seq for Outside school part and OLE that were entered in SLP module only. Due to the complexity of the database structure in the activity module, we are not able to provide the exact SQL you requested. Hope this can help. select s.classlevel '級別', s.classcode '班別', s.classno '班號', s.chname '中文姓名', s.enname '英文姓名', s.prog, s.progdesc from (SELECT a.CLASSLVL 'classlevel', a.CLASSCODE 'classcode', a.CLASSNO 'classno', a.chNAME 'chname', a.ENNAME 'enname', b.PROG_ENG 'prog', b.PROG_DESC_ENG'progdesc', c.seq 'seq' FROM TB_SLP_STU_OLE_FROMSLP b join VW_STU_LATESTSTUDENT a on a.suid=b.suid and a.STUID = b.STUID left outer join TB_SLP_OLE_SEQ c on a.STUID = c.STUID and b.ole_id = c.code_id and c.tb_id = 'SLP' WHERE a.schyear = ? union all select d1.classlvl, d1.classcode, d1.classno, d1.chname, d1.enname, c1.PROG, c1.PROG_DES, c1.seq from TB_SLP_STU_PERFME_OUTSCH c1 join vw_stu_lateststudent d1 on c1.suid=d1.suid and c1.stuid=d1.stuid where d1.schyear = ?) s where s.seq is null order by 1,2,3
edb-石頭, Thank you for your help. I've just tried the SQL and find nothing selected. It is because our school use ANP and SA in WebSAMS to prepare data for SLP. There is NO import from external system.