Roy Harvey
3/20/2007 2:22:00 PM
See if this gets you started.
SELECT step,
JobName,
Status
FROM workflowJobStatus_vw
WHERE WorkFlowNo = 42
UNION ALL
SELECT step,
JobName,
Status='None'
FROM WorkFlowDetail as A
WHERE WorkFlowName = dbo.GetWorkFlowName_fn(42)
AND NOT EXISTS
(select * from workflowJobStatus_vw as B
where A.WorkFlowNo = 42
and A.step = B.step
and A.JobName = B.JobName)
ORDER BY step
Roy Harvey
Beacon Falls, CT
On 20 Mar 2007 07:01:28 -0700, "jobs" <jobs@webdos.com> wrote:
>I have the following two qeuries producing the following results:
>
>
>
>select step,JobName,Status='None' from WorkFlowDetail where
>WorkFlowName=dbo.GetWorkFlowName_fn(42) order by step
>
>1 Gancho_Approval None
>2 Gancho_venta None
>3 Gancho_FTP None
>4 Gancho_file None
>
>select step,JobName,Status from workflowJobStatus_vw where
>WorkFlowNo=42 order by Step
>
>1 Gancho_Approval JOB
>
>
>The result I want is Rows from the second select if not found in the
>first.
>
>1 Gancho_Approval JOB
>2 Gancho_venta None
>3 Gancho_FTP None
>4 Gancho_file None
>
>Thanks for any help or information.