>> SELECT stu.student_id, stu.school_year, last_name, first_name, ; >> current_school, grade_level, gender_code, session_code, ; >> padl(day(date_of_birth),2,"0") as dd________, ; >> padl(month(date_of_birth), 2,"0") as mm________, ; >> year(date_of_birth) as yy________, ; >> address_mailing_line_1, address_city, state_code, ; >> address_zipcode, address_name, address_type_code ; >> FROM students AS stu ; >> LEFT JOIN addresses AS adr ; >> ON stu.student_id = adr.student_id AND ; >> stu.school_year = adr.school_year ; >> and stu.enrollment_status <> 'INACTIVE' ; && This line >> INTO CURSOR cstuadr nofilter >>>>The sql brings the records over even if the enrollment_status = 'inactive'