Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Posts
    28

    Unanswered: exporting to txt file

    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";
    Last edited by Strikerz95; 06-08-04 at 16:45.

  2. #2
    Join Date
    Dec 2003
    Location
    Houston, TX
    Posts
    21
    phpMyAdmin will export to CVS.

    Are the the last two lines blank or how you have them listed it here.

    "Grand Total:","Grand Total:","","Grand Total:@christianheritage.edu","g334","334",""
    "","","","@christianheritage.edu","","",""
    I do not fear computers. I fear the lack of them.
    -Isaac Asimov (1920 - 1992)

  3. #3
    Join Date
    May 2004
    Posts
    28
    Those are the two unnecessary lines that I do no want included in the txt file

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •