Toad World® Forums

Creating .txt files from PL/SQL

I have 2 queries … a list of courses and a list of students (ID, name, course) … I would like to create text files with the name of each course (ie: MATH1301-001.txt) and insert the student data into the corresponding course text file:
MATH1301-001.txt
ID0001, Smith, Jim, MATH1301-001
ID0002, Jones, Mary, MATH1301-001

ENGL1301-001.txt
ID0001, Smith, Jim, ENGL1301-001
ID0002, Jones, Mary, ENGL1301-001

etc …

Thank you for your input …