Page 1 of 1

Report with in-condition and out-condition

Posted: 19 Sep 2014 9:07
by anirudhrh
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.

Re: Report with in-condition and out-condition

Posted: 30 Jan 2015 11:15
by jstarkw
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'