I run a MySQL script that exports to a txt file. It works right except the last 2 lines of the txt file are unnecessary and display a grand total. Is there any command that turns writing that line off or something? Here is what the end of the txt file looks like:
Code:
"BHoneycutt","Honeycutt","Brie","BHoneycutt@christianheritage.edu","bh010161","010161","A"
"LLewis","Lewis","Lloyd","LLewis@christianheritage.edu","ll010165","010165","K"
"CPickel","Pickel","Carl","CPickel@christianheritage.edu","cp010195","010195","T"
"LTyler","Tyler","Linda","LTyler@christianheritage.edu","lt010199","010199","J"
"Grand Total:","Grand Total:","","Grand Total:@christianheritage.edu","g334","334",""
"","","","@christianheritage.edu","","",""
The script looks like this:
Code:
SELECT DISTINCT concat_ws(
'',
'"',
(
concat_ws(
'","',
concat_ws('',dept_id,crse_id),
descr_label
)
),
'"'
)
FROM chc_students INTO OUTFILE "/blackboard_create_courses.txt";