« Previous Next »

Not Answered Thread: 'Filename' is keyword in SELECT statment; how to escape it?

Last post 11-11-2009 7:27 PM by GuyHoozdis. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 11-08-2009, 6:10 PM

    'Filename' is keyword in SELECT statment; how to escape it?

     I have a column named "Filename" (and one called "Timestamp" too), but these seem to be keywords for Logparser. 

     $> LogParser.exe "SELECT Timestamp, Filename FROM datafile.tab" -i:TSV -iSeparator:tab -fixedSep:ON

    The above query does not give me the results I expect.  Is there a way for me to indicate that I mean the column in the file named "Timestamp" and "Filename" instead?  Of course I could change my column names to something like "myFilename", that did work, but I have to imagine there is another way.

     

    Amazing tool!  I can't wait to dig into it more.

  • 11-08-2009, 8:49 PM In reply to

    Re: 'Filename' is keyword in SELECT statment; how to escape it?

    It looks like only the "Filename" is a keyword.  I misspoke about the Timestamp.

     

    Here is an example of what I mean...

    ---- example.tab -------------------

     myTimestamp    myFilename    Timestamp    Filename
    11/8/2009 19:42    \easy\to\see.exe    1/1/2013 0:00    \still\here.chm
    11/8/2009 19:42    \me\too\see.exe    1/1/2013 0:00    \traveling\space.chm
    ----- end file -------------------------

    $> logparser "SELECT Filename FROM example.tab" -i:TSV -iSeparator:tab -fixedSep:ON

     I get the fullpath for example.tab where I mean to get the data in the column called "Filename".  Anybody know what I am doing wrong?

  • 11-11-2009, 7:27 PM In reply to

    Re: 'Filename' is keyword in SELECT statment; how to escape it?

    I've continued to search and read docs looking for a solution to this.  Nothing yet.  I imagine it is something simple.  I have tried things like escaping double quotes, using single quotes, brackets, ... hmmm, what am I missing?

     

    Anybot?

Page 1 of 1 (3 items)
Microsoft Communities