SELECCIONAR NewTemplate.ProcessSequence, NewTemplate.MasterProcessID, NewTemplate.WorkFlowProcessID
DE (
SELECCIONAR tblWorkFlowTemplates.MasterProcessID, tblWorkFlowAssignmentsDetail.WorkFlowAssignmentID, tblWorkFlowTemplates.ProcessSequence,
tblWorkFlowTemplates.TemplateMasterID, tblWorkFlowAssignmentsDetail.Completed
Del tblWorkFlowAssignmentsDetail INTERNO ENSAMBLAR los tblWorkFlowTemplates ENCENDIDO
tblWorkFlowAssignmentsDetail.WorkFlowProcessID = tblWorkFlowTemplates.WorkFlowProcessID
DONDE tblWorkFlowAssignmentsDetail.WorkFlowAssignmentID = @mWorkFlowAssignmentID
ORDEN POR tblWorkFlowTemplates.ProcessSequence
) CurrentTemplate
LA DERECHA ENSAMBLA (
SELECCIONAR tblWorkFlowTemplates.MasterProcessID, tblWorkFlowTemplates.ProcessSequence,
tblWorkFlowTemplates.TemplateMasterID, tblWorkFlowTemplates.WorkFlowProcessID
De tblWorkFlowTemplates
DONDE tblWorkFlowTemplates.TemplateMasterID = @WorkFlowTemplate
ORDEN POR tblWorkFlowTemplates.ProcessSequence
) NewTemplate EN CurrentTemplate.MasterProcessID = NewTemplate.MasterProcessID
DONDE está nulo O CurrentTemplate.Completed CurrentTemplate.MasterProcessID = 0
ORDEN POR NewTemplate.ProcessSequence
|