In Log Parser Can we write a join query on two files ? Because i want to display an output from two files based on one common relation between them, Is this possible to do with Log Parser? if so please suggest an example, Thanks in Advance

有帮助吗?

解决方案

Apparently LogParser v2.2 (latest version unfortunately) doesn't support JOIN operations.

I've seen a few samples on the internet that suggest ways to try and simulate a JOIN. One used a IN operation with a sub-query in the WHERE clause:

SELECT * FROM Log1 WHERE FieldA IN (SELECT FieldA FROM Log2)

That may be sufficient for what some people need JOINs for - filtering. But if you want to see data from two different sources on the same line - that's not going to accomplish it.

其他提示

If the files are in the same format, you can reference both in your FROM statement, for example:

SELECT * 
FROM c:\*.log
WHERE cs-username = 'joe'

This example would include any files that end with .log in the root of c:\

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top