Hello All,
i need a SQL query which would pull out in-conditions and out-conditions of all jobs in a table. irrespective of jobs having any one condition.
ie : If a job doesnt have out condition, i want it to show in-condition.
Report with in-condition and out-condition
Re: Report with in-condition and out-condition
Try this to Get jobname, in/outconditions, and cmd line.
SELECT a.CONDITION AS "In Condition",c.GROUP_NAME AS "Group Name",c.JOB_NAME AS "Job name",
b.CONDITION AS "Out Condition", c.CMD_LINE AS "Command Line"
FROM ((DEF_VER_JOB c
LEFT JOIN DEF_VER_LNKI_P a
ON
c.TABLE_ID = a.TABLE_ID and c.JOB_ID = a.JOB_ID and c.VERSION_SERIAL = a.VERSION_SERIAL)
LEFT JOIN DEF_VER_LNKO_P b
ON
c.TABLE_ID = b.TABLE_ID and c.JOB_ID = b.JOB_ID and c.VERSION_SERIAL = b.VERSION_SERIAL)
WHERE
c.APPLICATION='Enter an app name or remove line' and
c.GROUP_NAME='enter a group name or remove this line' and
c.IS_CURRENT_VERSION='Y'
SELECT a.CONDITION AS "In Condition",c.GROUP_NAME AS "Group Name",c.JOB_NAME AS "Job name",
b.CONDITION AS "Out Condition", c.CMD_LINE AS "Command Line"
FROM ((DEF_VER_JOB c
LEFT JOIN DEF_VER_LNKI_P a
ON
c.TABLE_ID = a.TABLE_ID and c.JOB_ID = a.JOB_ID and c.VERSION_SERIAL = a.VERSION_SERIAL)
LEFT JOIN DEF_VER_LNKO_P b
ON
c.TABLE_ID = b.TABLE_ID and c.JOB_ID = b.JOB_ID and c.VERSION_SERIAL = b.VERSION_SERIAL)
WHERE
c.APPLICATION='Enter an app name or remove line' and
c.GROUP_NAME='enter a group name or remove this line' and
c.IS_CURRENT_VERSION='Y'