~[wc:commonscripts] "Student Id","Last Name","First Name","Type","Address","City","State","Zip","Home Phone","Work Phone","Cell Phone","Email" ~[TLIST_SQL; SELECT REPLACE(s.student_number, '"', '""'), REPLACE(SUBSTR(s.mother, INSTR(s.mother, ' ', -1) + 1), '"', '""'), REPLACE(SUBSTR(s.mother, 1, INSTR(s.mother, ' ') - 1), '"', '""'), REPLACE('1', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""') FROM students s, schools ss WHERE s.student_number IS NOT NULL AND s.last_name IS NOT NULL AND (s.enroll_status = 0 OR s.enroll_status = -1) AND s.schoolid = ss.school_number AND s.mother IS NOT NULL ]"~(1;T)","~(2;T)","~(3;T)","~(4;T)","~(5;T)","~(6;T)","~(7;T)","~(8;T)","~(9;T)","~(10;T)","~(11;T)","~(12;T)" [/TLIST_SQL]~[TLIST_SQL; SELECT REPLACE(s.student_number, '"', '""'), REPLACE(SUBSTR(s.father, INSTR(s.father, ' ', -1) + 1), '"', '""'), REPLACE(SUBSTR(s.father, 1, INSTR(s.father, ' ') - 1), '"', '""'), REPLACE('2', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""') FROM students s, schools ss WHERE s.student_number IS NOT NULL AND s.last_name IS NOT NULL AND (s.enroll_status = 0 OR s.enroll_status = -1) AND s.schoolid = ss.school_number AND s.father IS NOT NULL ]"~(1;T)","~(2;T)","~(3;T)","~(4;T)","~(5;T)","~(6;T)","~(7;T)","~(8;T)","~(9;T)","~(10;T)","~(11;T)","~(12;T)" [/TLIST_SQL]~[TLIST_SQL; SELECT REPLACE(s.student_number, '"', '""'), REPLACE(ps_customfields.getStudentsCF(s.id, 'Guardian_LN'), '"', '""'), REPLACE(ps_customfields.getStudentsCF(s.id, 'Guardian_FN'), '"', '""'), REPLACE('3', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""'), REPLACE('', '"', '""') FROM students s, schools ss WHERE s.student_number IS NOT NULL AND s.last_name IS NOT NULL AND (s.enroll_status = 0 OR s.enroll_status = -1) AND s.schoolid = ss.school_number AND ps_customfields.getStudentsCF(s.id, 'Guardian_LN') IS NOT NULL ]"~(1;T)","~(2;T)","~(3;T)","~(4;T)","~(5;T)","~(6;T)","~(7;T)","~(8;T)","~(9;T)","~(10;T)","~(11;T)","~(12;T)" [/TLIST_SQL]