~[wc:commonscripts] "Student Id","Last Name","Middle Name","First Name","Date of Birth","Gender","Grade","Address","City","State","Zip","Race","District of Residence","District of Service","Student Reporting Id","Building" ~[TLIST_SQL; SELECT REPLACE(s.student_number, '"', '""'), REPLACE(s.last_name, '"', '""'), REPLACE(s.middle_name, '"', '""'), REPLACE(s.first_name, '"', '""'), REPLACE(TO_CHAR(s.dob,'YYYY-mm-dd'), '"', '""'), REPLACE(s.gender, '"', '""'), REPLACE(s.grade_level, '"', '""'), REPLACE(s.street, '"', '""'), REPLACE(s.city, '"', '""'), REPLACE(s.state, '"', '""'), REPLACE(s.zip, '"', '""'), REPLACE(s.ethnicity, '"', '""'), REPLACE((select gen.name from gen where cat='districts' and gen.value=s.districtofresidence and rownum=1), '"', '""'), REPLACE('', '"', '""'), REPLACE(s.state_studentnumber, '"', '""'), REPLACE(ss.name, '"', '""') 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 ]"~(1;T)","~(2;T)","~(3;T)","~(4;T)","~(5;T)","~(6;T)","~(7;T)","~(8;T)","~(9;T)","~(10;T)","~(11;T)","~(12;T)","~(13;T)","~(14;T)","~(15;T)","~(16;T)" [/TLIST_SQL]