Hi Anders,
I made some presumptions around what you are trying to achieve here and I decided that you were probably trying to put together a consolidated error report. I then created a csv file containing the errors and their source - and any other info you may find useful.
It looks like this, where the first field is the token you want to use in your like statement in the select and the rest of the info are your literals.
ORA-19625,SLREFW04,Oracle,
ORAO/S-Error,SLREFW04,Oracle,
Now in a simple DOS emulation FOR loop we can loop through the logs and look for any and all defined tokens that indicate errors. We can use the inbuilt variables to get the date too. This is reflected here;
The following statement
for /F "tokens=1,2-4 delims=," %i in (oerrs.txt) do logparser "select strcat('%j,%k,DATE%',Text) as Error from ora.txt where Text like '%%i%'" -i:textline -q:on
Generates this output
SLREFW04,Oracle,09/10/2008ORA-19625: file error
SLREFW04,Oracle,09/10/2008'ORAO/S-Error: file not found
The following example of how to pump this straight into a SQL server database comes from the help file;
SQL Output Format Examples
LogParser "SELECT Path, KeyName, ValuleName INTO MyTable FROM \HKLM" -i:REG
-o:SQL -server:MyServer -database:MyDatabase -driver:"SQL Server" -username:TestSQLUser
-password:TestSQLPassword -createTable:ON
You can play with the createtable and cleartable directives to either recreate the table from scratch, clear it at each run or append to it.
Hope this helps.
Cheers, Dave