I have a sql statement that works well when run from the command line. It returns 60 records (or whatever the amount at that time is).
"C:\Program Files (x86)\Log Parser 2.2\LogParser.exe" "SELECT COUNT(cs-uri-stem) FROM c:\inetpub\logs\logfiles\w3svc1\u_ex1104*.log WHERE sc-status=200 AND cs-uri-stem LIKE '%music%.mp3' AND sc-bytes >= 1377915" -i:W3C -o:W3C
If I put it in a .bat and run it, though, it returns 0 records. I think it's because the batch file is expecting %music% to be a variable and not a wildcard.
I tried *music* but it returned 0 records, too.
Is there a way to escape the % or use a different character, so both the batch and statement work?
JJ