« Previous Next »

Thread: using Logpaser in a batch job

Last post 10-04-2006 10:49 AM by LogParser User : DEinspanjer. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 10-03-2006, 1:03 PM

    using Logpaser in a batch job

    I am using a batch job to manage some services, and I am calling a batch job that has the following command:

     

    logparser -i:TEXTLINE -statsFF -rtp:25 "select text from c:\qresults.txt where text like '%erp%' or text like '%service_name%' or text like '%state%'"

     

    when that batch job run either through that call function or if I simply double click on it I get the following error:

    C:\batchwork>logparser -i:TEXTLINE -statsFF -rtp:25 "select text from c:\qresu
    lts.txt where text like '' or text like '' or text like ''"
    Error: Syntax Error: <term2>: no valid LIKE mask

     

    I have even tried collecting just one names,and get the same error. I am sure this is being cuased becase batch jobs see %xxx% as a variable name, I tried declaring the  variable but I have not had much success. Any help would be appricieated.

     

    Thx,

    -d

     

     

  • 10-04-2006, 10:49 AM In reply to

    RE: using Logpaser in a batch job

    Yes the problem is because the batch file is interpreting the %xx% as a variable. Double up your % signs to escape them from the batch interpreter.
    e.g. LIKE %%erp%%
Page 1 of 1 (2 items)
Microsoft Communities