broken sql

J

JB

can anyone help me do a wild card sql query on a log file?

here is my attempt:


LogParser "SELECT Text, COUNT(*) FROM c:\srq723.txt where (text
='Local4.Critical') OR (text like'Local4.%') GROUP BY Text ORDER BY
COUNT(*) DESC" -i:TEXTWORD


it gives me this:


C:\Program Files\Log Parser 2.2>LogParser "SELECT Text, COUNT(*) FROM
c:\srq723.
txt where (text ='Local4.Critical') OR (text like'Local4.TEXTWORD
Error: Syntax Error: <expression>: OR operator not followed by an
<expression>
 
R

Ragnar Midtskogen

If what you post is exactly wht you are using, then there is no space
between "text" and "Like" in the (text like'Local4.%') string.

Ragnar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top