Previous Next

Thread: How to suppress the Filename and RowNumber fields for CSV input

Last post 05-12-2008 12:47 AM by yamaken. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 03-05-2008, 4:24 PM

    How to suppress the Filename and RowNumber fields for CSV input

    I have various .csv files that I want to query using logParser to create bar charts out of.  If I do a "Select * ..." on the file, then Filename and RowNumber are returned and LogParser fails to create the graph with a 'Column XYZ is not an INTEGER or a REAL'.

    I know I could get around this by specifying the specific column names I'm interested in - but I don't want to need to know the column names ahead of time.  I'll be processing varying .csv files and would like to be able to handle a dynamic number of columns and just pass it in with a SELECT *.

    I found a thread way back from 2005 where it looked like someone else had a similar problem, and it was indicated there that the 'next' version of LogParser would have the ability to suppress these extra fields.  Is it there somewhere and I'm just not finding it?

    Thanks,

    Jared

  • 03-06-2008, 2:18 AM In reply to

    Re: How to suppress the Filename and RowNumber fields for CSV input

    I don't use to parse csv file, but have you take a look at the log parser help file. Lot of details on CSV input format fields and parameters like headerRow, nSkiplines etc that might help.

    Cheers,
    Bernard Cheah
  • 03-06-2008, 12:13 PM In reply to

    Re: How to suppress the Filename and RowNumber fields for CSV input

    Thanks for your response.  Unfortunately, I've checked the help and there is no available parameter to accomplish what I need.  I need to be able to prevent or suppress the Filename and RowNumber fields from showing up in the output.

  • 05-12-2008, 12:47 AM In reply to

    • yamaken
    • Not Ranked
    • Joined on 05-12-2008, 12:44 AM
    • Posts 1

    Re: How to suppress the Filename and RowNumber fields for CSV input

    Can you specify the field names when you parse the data with LogParser?

    When we do not specify the field (column) names to select from the CSV data, it seems it is inevitable to load the first two columns, so naturally you need another solution to accomplish what you (or we, as I sufffer from the same problem.) need.

    Regards,

    Kenji Yamamoto, MCSE
    Microsoft MVP for Windows Security (2002.10-2008.09)
Page 1 of 1 (4 items)
Page view counter