I need to filter out some additonal data from an allready working select statement. The database has two tables. One is a log table and the other is a job history table. I need to corrolate the log entires for the failed jobs based on job id.
Log table has a field for job id.
history table has a field for jobid, instance, and exit code.
with the following code i am able to get the data i want but i need to trim down instances of the job that have completed sucessfully. How can i do that?
not ({NV_LOGS.LOG_MESSAGE} like "ERROR: Backup log * ( backup type: 'TRANSACTION/LOG NORMAL') is unavailable") and
not ({NV_LOGS.LOG_MESSAGE} like "Items other than 'Archive Logs' selected in the *") and
not ({NV_LOGS.LOG_MESSAGE} like "Transfer to the device*stalled*") and
{NV_JOB_HISTORY.Phase} = 1 and
{NV_LOGS.DATE_TIME} >= CurrentDate-1 and
{NV_JOB_HISTORY.Exit Status} = "Backup Failed" and
{NV_LOGS.JOBID} <> -1 and
{NV_LOGS.WARN_LEVEL} in ["Warning", "Severe Error", "Error"] and
{NV_JOB_HISTORY.Start Date} >= CurrentDate-1
Thanks for the help in advance.