use WIALXSystem go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from Participant P inner join WIALXSystem.dbo.Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join ParticipantXFundingStream PxFS on P.ParticipantID = PxFS.ParticipantID and PxFS.SelfServiceOnlyIndicator = 0 inner join WIALXSystem.dbo.Code CFS on CFS.CodeID = PxFS.FundingStreamTypeID and CFS.CodeAbbrv in (''Adult'') inner join ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join WIALXSystem.dbo.Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join WIALXSystem.dbo.Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join WIALXSystem.dbo.Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join WIALXSystem.dbo.Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join WIALXSystem.dbo.Code CR on CR.CodeID = PYR.RangeTypeID and PYR.CumulativeIndicator = case CR.CodeAbbrv when ''Quarter'' then 0 else 1 end inner join WIALXSystem.dbo.Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''WIA'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.ReportTypeID = PYR.RangeTypeID -- Participant Filter -- inner join WIALXSystem.dbo.Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join WIALXSystem.dbo.Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(23)'' where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''1'' and (ESC3.CodeAbbrv = ''1'' and (ET2.CodeAbbrv = ''5'' and isNull(PxE2.ExitWages,0) = 0 ) or (ET3.CodeAbbrv = ''5'' and isNull(PxE3.ExitWages,0) = 0 ) ) ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') ' where PerformanceOutcomeGroupID = 682 go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from Participant P inner join WIALXSystem.dbo.Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join ParticipantXFundingStream PxFS on P.ParticipantID = PxFS.ParticipantID and PxFS.SelfServiceOnlyIndicator = 0 inner join WIALXSystem.dbo.Code CFS on CFS.CodeID = PxFS.FundingStreamTypeID and CFS.CodeAbbrv in (''DW'') inner join ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join WIALXSystem.dbo.Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join WIALXSystem.dbo.Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join WIALXSystem.dbo.Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join WIALXSystem.dbo.Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join WIALXSystem.dbo.Code CR on CR.CodeID = PYR.RangeTypeID and PYR.CumulativeIndicator = case CR.CodeAbbrv when ''Quarter'' then 0 else 1 end inner join WIALXSystem.dbo.Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''WIA'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.ReportTypeID = PYR.RangeTypeID -- Participant Filter -- inner join WIALXSystem.dbo.Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join WIALXSystem.dbo.Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(23)'' where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''1'' and (ESC3.CodeAbbrv = ''1'' and (ET2.CodeAbbrv = ''5'' and isNull(PxE2.ExitWages,0) = 0 ) or (ET3.CodeAbbrv = ''5'' and isNull(PxE3.ExitWages,0) = 0 ) ) ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') ' where PerformanceOutcomeGroupID = 683 go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from TableO_Participant P inner join ETANameLookup ETA on isNull(ETA.ETAName,'''') = isNull(P.WIBName,'''') and ETA.ETACode = P.ETACode inner join WIALXSystem.dbo.Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join TableO_ParticipantXFundingStream PxFS on P.ParticipantID = PxFS.ParticipantID and PxFS.SelfServiceOnlyIndicator = 0 inner join WIALXSystem.dbo.Code CFS on CFS.CodeID = PxFS.FundingStreamTypeID and CFS.CodeAbbrv in (''Adult'') inner join TableO_ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join TableO_ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join TableO_ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join WIALXSystem.dbo.Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join WIALXSystem.dbo.Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join WIALXSystem.dbo.Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join WIALXSystem.dbo.Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join WIALXSystem.dbo.Code CR on CR.CodeID = PYR.RangeTypeID and PYR.CumulativeIndicator = case CR.CodeAbbrv when ''Quarter'' then 0 else 1 end inner join WIALXSystem.dbo.Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''WIA'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.ReportTypeID = PYR.RangeTypeID -- Participant Filter -- inner join WIALXSystem.dbo.Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join WIALXSystem.dbo.Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(23)'' and POG.InsertSelectMetric like ''%TableO%'' where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''1'' and (ESC3.CodeAbbrv = ''1'' and (ET2.CodeAbbrv = ''5'' and isNull(PxE2.ExitWages,0) = 0 ) or (ET3.CodeAbbrv = ''5'' and isNull(PxE3.ExitWages,0) = 0 ) ) ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') ' where PerformanceOutcomeGroupID = 684 go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from TableO_Participant P inner join ETANameLookup ETA on isNull(ETA.ETAName,'''') = isNull(P.WIBName,'''') and ETA.ETACode = P.ETACode inner join WIALXSystem.dbo.Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join TableO_ParticipantXFundingStream PxFS on P.ParticipantID = PxFS.ParticipantID and PxFS.SelfServiceOnlyIndicator = 0 inner join WIALXSystem.dbo.Code CFS on CFS.CodeID = PxFS.FundingStreamTypeID and CFS.CodeAbbrv in (''DW'') inner join TableO_ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join TableO_ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join TableO_ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join WIALXSystem.dbo.Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join WIALXSystem.dbo.Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join WIALXSystem.dbo.Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join WIALXSystem.dbo.Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join WIALXSystem.dbo.Code CR on CR.CodeID = PYR.RangeTypeID and PYR.CumulativeIndicator = case CR.CodeAbbrv when ''Quarter'' then 0 else 1 end inner join WIALXSystem.dbo.Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''WIA'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.ReportTypeID = PYR.RangeTypeID -- Participant Filter -- inner join WIALXSystem.dbo.Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join WIALXSystem.dbo.Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(23)'' and POG.InsertSelectMetric like ''%TableO%'' where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''1'' and (ESC3.CodeAbbrv = ''1'' and (ET2.CodeAbbrv = ''5'' and isNull(PxE2.ExitWages,0) = 0 ) or (ET3.CodeAbbrv = ''5'' and isNull(PxE3.ExitWages,0) = 0 ) ) ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') ' where PerformanceOutcomeGroupID = 685 go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from Participant P inner join Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join Code CR on CR.CodeID = PYR.RangeTypeID inner join Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''LX'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.LXGroupID = PYR.LXGroupID -- Participant Filter -- inner join Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(23)'' and POG.SystemID = CSys.CodeID and POG.ProgramYearID = PYR.ProgramYearID where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''1'' and (ESC3.CodeAbbrv = ''1'' and (ET2.CodeAbbrv = ''5'' and isNull(PxE2.ExitWages,0) = 0 ) or (ET3.CodeAbbrv = ''5'' and isNull(PxE3.ExitWages,0) = 0 ) ) ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') ' where PerformanceOutcomeGroupID = 686 go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from Participant P inner join WIALXSystem.dbo.Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join ParticipantXFundingStream PxFS on P.ParticipantID = PxFS.ParticipantID and PxFS.SelfServiceOnlyIndicator = 0 inner join WIALXSystem.dbo.Code CFS on CFS.CodeID = PxFS.FundingStreamTypeID and CFS.CodeAbbrv in (''NEG'') inner join WIALXSystem.dbo.Code CST on CST.CodeID = PxFS.ServiceTypeID and CST.CodeAbbrv in (''SELFSERV'') inner join ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join WIALXSystem.dbo.Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join WIALXSystem.dbo.Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join WIALXSystem.dbo.Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join WIALXSystem.dbo.Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join WIALXSystem.dbo.Code CR on CR.CodeID = PYR.RangeTypeID and PYR.CumulativeIndicator = case CR.CodeAbbrv when ''Quarter'' then 0 else 1 end inner join WIALXSystem.dbo.Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''WIA'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.ReportTypeID = PYR.RangeTypeID -- Participant Filter -- inner join WIALXSystem.dbo.Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join WIALXSystem.dbo.Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(NEG-23)'' where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''1'' and (ESC3.CodeAbbrv = ''1'' and (ET2.CodeAbbrv = ''5'' and isNull(PxE2.ExitWages,0) = 0 ) or (ET3.CodeAbbrv = ''5'' and isNull(PxE3.ExitWages,0) = 0 ) ) ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') and exists (select ''c'' from ParticipantXNEGProject PxNEG where PxNEG.ParticipantID = P.ParticipantID) ' where PerformanceOutcomeGroupID = 687 go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from Participant P inner join WIALXSystem.dbo.Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join ParticipantXFundingStream PxFS on P.ParticipantID = PxFS.ParticipantID and PxFS.SelfServiceOnlyIndicator = 0 inner join WIALXSystem.dbo.Code CFS on CFS.CodeID = PxFS.FundingStreamTypeID and CFS.CodeAbbrv in (''NEG'') inner join WIALXSystem.dbo.Code CST on CST.CodeID = PxFS.ServiceTypeID and CST.CodeAbbrv in (''SELFSERV'') inner join ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join WIALXSystem.dbo.Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join WIALXSystem.dbo.Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join WIALXSystem.dbo.Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join WIALXSystem.dbo.Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join WIALXSystem.dbo.Code CR on CR.CodeID = PYR.RangeTypeID and PYR.CumulativeIndicator = case CR.CodeAbbrv when ''Quarter'' then 0 else 1 end inner join WIALXSystem.dbo.Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''WIA'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.ReportTypeID = PYR.RangeTypeID -- Participant Filter -- inner join WIALXSystem.dbo.Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join WIALXSystem.dbo.Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(NEG-24)'' where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''2'' and ET2.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE2.ExitWages,0) = 0 ) or (ESC3.CodeAbbrv = ''2'' and ET3.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE3.ExitWages,0) = 0 ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') and exists (select ''c'' from ParticipantXNEGProject PxNEG where PxNEG.ParticipantID = P.ParticipantID) ' where PerformanceOutcomeGroupID = 688 go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from Participant P inner join WIALXSystem.dbo.Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join ParticipantXFundingStream PxFS on P.ParticipantID = PxFS.ParticipantID and PxFS.SelfServiceOnlyIndicator = 0 inner join WIALXSystem.dbo.Code CFS on CFS.CodeID = PxFS.FundingStreamTypeID and CFS.CodeAbbrv in (''Adult'') inner join ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join WIALXSystem.dbo.Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join WIALXSystem.dbo.Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join WIALXSystem.dbo.Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join WIALXSystem.dbo.Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join WIALXSystem.dbo.Code CR on CR.CodeID = PYR.RangeTypeID and PYR.CumulativeIndicator = case CR.CodeAbbrv when ''Quarter'' then 0 else 1 end inner join WIALXSystem.dbo.Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''WIA'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.ReportTypeID = PYR.RangeTypeID -- Participant Filter -- inner join WIALXSystem.dbo.Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join WIALXSystem.dbo.Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(24)'' where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''2'' and ET2.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE2.ExitWages,0) = 0 ) or (ESC3.CodeAbbrv = ''2'' and ET3.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE3.ExitWages,0) = 0 ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') ' where PerformanceOutcomeGroupID = 689 go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from Participant P inner join WIALXSystem.dbo.Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join ParticipantXFundingStream PxFS on P.ParticipantID = PxFS.ParticipantID and PxFS.SelfServiceOnlyIndicator = 0 inner join WIALXSystem.dbo.Code CFS on CFS.CodeID = PxFS.FundingStreamTypeID and CFS.CodeAbbrv in (''DW'') inner join ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join WIALXSystem.dbo.Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join WIALXSystem.dbo.Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join WIALXSystem.dbo.Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join WIALXSystem.dbo.Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join WIALXSystem.dbo.Code CR on CR.CodeID = PYR.RangeTypeID and PYR.CumulativeIndicator = case CR.CodeAbbrv when ''Quarter'' then 0 else 1 end inner join WIALXSystem.dbo.Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''WIA'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.ReportTypeID = PYR.RangeTypeID -- Participant Filter -- inner join WIALXSystem.dbo.Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join WIALXSystem.dbo.Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(24)'' where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''2'' and ET2.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE2.ExitWages,0) = 0 ) or (ESC3.CodeAbbrv = ''2'' and ET3.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE3.ExitWages,0) = 0 ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') ' where PerformanceOutcomeGroupID = 690 go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from TableO_Participant P inner join ETANameLookup ETA on isNull(ETA.ETAName,'''') = isNull(P.WIBName,'''') and ETA.ETACode = P.ETACode inner join WIALXSystem.dbo.Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join TableO_ParticipantXFundingStream PxFS on P.ParticipantID = PxFS.ParticipantID and PxFS.SelfServiceOnlyIndicator = 0 inner join WIALXSystem.dbo.Code CFS on CFS.CodeID = PxFS.FundingStreamTypeID and CFS.CodeAbbrv in (''Adult'') inner join TableO_ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join TableO_ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join TableO_ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join WIALXSystem.dbo.Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join WIALXSystem.dbo.Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join WIALXSystem.dbo.Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join WIALXSystem.dbo.Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join WIALXSystem.dbo.Code CR on CR.CodeID = PYR.RangeTypeID and PYR.CumulativeIndicator = case CR.CodeAbbrv when ''Quarter'' then 0 else 1 end inner join WIALXSystem.dbo.Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''WIA'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.ReportTypeID = PYR.RangeTypeID -- Participant Filter -- inner join WIALXSystem.dbo.Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join WIALXSystem.dbo.Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(24)'' and POG.InsertSelectMetric like ''%TableO%'' where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''2'' and ET2.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE2.ExitWages,0) = 0 ) or (ESC3.CodeAbbrv = ''2'' and ET3.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE3.ExitWages,0) = 0 ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') ' where PerformanceOutcomeGroupID = 691 go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from TableO_Participant P inner join ETANameLookup ETA on isNull(ETA.ETAName,'''') = isNull(P.WIBName,'''') and ETA.ETACode = P.ETACode inner join WIALXSystem.dbo.Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join TableO_ParticipantXFundingStream PxFS on P.ParticipantID = PxFS.ParticipantID and PxFS.SelfServiceOnlyIndicator = 0 inner join WIALXSystem.dbo.Code CFS on CFS.CodeID = PxFS.FundingStreamTypeID and CFS.CodeAbbrv in (''DW'') inner join TableO_ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join TableO_ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join TableO_ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join WIALXSystem.dbo.Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join WIALXSystem.dbo.Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join WIALXSystem.dbo.Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join WIALXSystem.dbo.Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join WIALXSystem.dbo.Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join WIALXSystem.dbo.Code CR on CR.CodeID = PYR.RangeTypeID and PYR.CumulativeIndicator = case CR.CodeAbbrv when ''Quarter'' then 0 else 1 end inner join WIALXSystem.dbo.Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''WIA'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.ReportTypeID = PYR.RangeTypeID -- Participant Filter -- inner join WIALXSystem.dbo.Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join WIALXSystem.dbo.Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(24)'' and POG.InsertSelectMetric like ''%TableO%'' where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''2'' and ET2.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE2.ExitWages,0) = 0 ) or (ESC3.CodeAbbrv = ''2'' and ET3.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE3.ExitWages,0) = 0 ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') ' where PerformanceOutcomeGroupID = 692 go update PerformanceOutcomeGroupCalcString set InsertFromWhere = ' from Participant P inner join Code CS on CS.CodeGroup = ''Source'' and CS.CodeAbbrv = ''FILEPROCESS'' inner join ParticipantXEmployment PxE1 on P.ParticipantID = PxE1.ParticipantID and PxE1.QuarterPeriod = 1 inner join ParticipantXEmployment PxE2 on P.ParticipantID = PxE2.ParticipantID and PxE2.QuarterPeriod = 2 inner join ParticipantXEmployment PxE3 on P.ParticipantID = PxE3.ParticipantID and PxE3.QuarterPeriod = 3 inner join Code ESC1 on ESC1.CodeID = PxE1.EmploymentStatusID inner join Code ET1 on ET1.CodeID = PxE1.EmploymentTypeID inner join Code ESC2 on ESC2.CodeID = PxE2.EmploymentStatusID inner join Code ET2 on ET2.CodeID = PxE2.EmploymentTypeID inner join Code ESC3 on ESC3.CodeID = PxE3.EmploymentStatusID inner join Code ET3 on ET3.CodeID = PxE3.EmploymentTypeID inner join Cohort Ch on Ch.CohortAbbrv = ''RETEARNINGS'' inner join ProgramYearRange PYR on PYR.CohortID = Ch.CohortID inner join Code CR on CR.CodeID = PYR.RangeTypeID inner join Code CSys on CH.SystemID = CSys.CodeID and PYR.CohortID = Ch.CohortID and CSys.CodeAbbrv = ''LX'' inner join CalculationSet CalcSet on CalcSet.CalculationSetID = PYR.CalculationSetID and CalcSet.CalculationSetName = ''Dynamic'' inner join UserReportingOptions URO on URO.ReportQtrDueID = PYR.QuarterPeriod and URO.ProgramYearID = PYR.ProgramYearID and URO.LXGroupID = PYR.LXGroupID -- Participant Filter -- inner join Code CPY on CPY.CodeID = PYR.ProgramYearID inner join ExitQuarterRange EQR on EQR.ExitQuarterAbbrv = ''7to8'' and EQR.ReportQuarter = PYR.QuarterPeriod and EQR.ProgramYearID = PYR.ProgramYearID and EQR.CalculationSetID = PYR.CalculationSetID inner join Code CER on CER.CodeID = P.ExitReasonID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = @PerformanceOutcomeGroupID and URO.ProgramYearID = POG.ProgramYearID and POG.PerformanceOutcomeGroupAbbrv = ''A-1(24)'' and POG.SystemID = CSys.CodeID and POG.ProgramYearID = PYR.ProgramYearID where P.ProgramExitDate between EQR.ExitStartDate and EQR.ExitEndDate and P.ProgramExitDate between PYR.ProgramStartDate and PYR.ProgramEndDate and ESC1.CodeAbbrv = ''1'' and ET1.CodeAbbrv in (''5'') and isNull(PxE1.ExitWages,0) = 0 and ( (ESC2.CodeAbbrv = ''2'' and ET2.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE2.ExitWages,0) = 0 ) or (ESC3.CodeAbbrv = ''2'' and ET3.CodeAbbrv in (''0'',''NotDefined'') and isNull(PxE3.ExitWages,0) = 0 ) ) and CER.CodeAbbrv in (''00'',''98'',''NotDefined'') ' where PerformanceOutcomeGroupID = 693 go update MetricType set InsertParticipantFromWhere ='from ParticipantXPerformanceOutcomeGroupCount PxPOGC inner join PerformanceOutcomeGroupCount POGC on PxPOGC.PerformanceOutcomeGroupCountID = POGC.PerformanceOutcomeGroupCountID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = POGC.PerformanceOutcomeGroupID and POG.ProgramYearID = @ProgramYearID and POG.PerformanceOutcomeGroupAbbrv in (''A-1(6)'',''A-1(7)'',''A-1(8)'',''A-1(9)'',''A-1(10)'',''A-1(11)'',''A-1(13)'',''A-1(14)'', ''A-1(15)'',''A-1(16)'',''A-1(17)'',''A-1(18)'',''A-1(19)'',''A-1(20)'',''A-1(21)'',''A-1(22)'',''A-1(23)'',''A-1(24)'') inner join WIALXSystem.dbo.Code CFS on POG.FundingStreamTypeID = CFS.CodeID and CFS.CodeAbbrv = ''Adult'' inner join ProgramYearRange PYR on PYR.ProgramYearRangeID = POGC.ProgramYearRangeID inner join WIALXSystem.dbo.Code CR on CR.CodeGroup = ''RangeType'' inner join UserReportingOptions URO on URO.ReportTypeID = CR.CodeID ' where MetricTypeID = 4336 go update MetricType set InsertParticipantFromWhere = 'from ParticipantXPerformanceOutcomeGroupCount PxPOGC inner join PerformanceOutcomeGroupCount POGC on PxPOGC.PerformanceOutcomeGroupCountID = POGC.PerformanceOutcomeGroupCountID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = POGC.PerformanceOutcomeGroupID and POG.ProgramYearID = @ProgramYearID and POG.PerformanceOutcomeGroupAbbrv in (''A-1(6)'',''A-1(7)'',''A-1(8)'',''A-1(9)'',''A-1(10)'',''A-1(11)'',''A-1(13)'',''A-1(14)'', ''A-1(15)'',''A-1(16)'',''A-1(17)'',''A-1(18)'',''A-1(19)'',''A-1(20)'',''A-1(21)'',''A-1(22)'',''A-1(23)'',''A-1(24)'') inner join WIALXSystem.dbo.Code CFS on POG.FundingStreamTypeID = CFS.CodeID and CFS.CodeAbbrv = ''DW'' inner join ProgramYearRange PYR on PYR.ProgramYearRangeID = POGC.ProgramYearRangeID inner join WIALXSystem.dbo.Code CR on CR.CodeGroup = ''RangeType'' inner join UserReportingOptions URO on URO.ReportTypeID = CR.CodeID ' where MetricTypeID = 4338 go update MetricType set InsertParticipantFromWhere = 'from ParticipantXPerformanceOutcomeGroupCount PxPOGC inner join PerformanceOutcomeGroupCount POGC on PxPOGC.PerformanceOutcomeGroupCountID = POGC.PerformanceOutcomeGroupCountID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = POGC.PerformanceOutcomeGroupID and POG.ProgramYearID = @ProgramYearID and POG.PerformanceOutcomeGroupAbbrv in (''A-1(NEG-6)'',''A-1(NEG-7)'',''A-1(NEG-8)'',''A-1(NEG-9)'',''A-1(NEG-10)'',''A-1(NEG-11)'',''A-1(NEG-13)'',''A-1(NEG-14)'', ''A-1(NEG-15)'',''A-1(NEG-16)'',''A-1(NEG-17)'',''A-1(NEG-18)'',''A-1(NEG-19)'',''A-1(NEG-20)'',''A-1(NEG-21)'',''A-1(NEG-22)'',''A-1(NEG-23)'',''A-1(NEG-24)'') inner join WIALXSystem.dbo.Code CFS on POG.FundingStreamTypeID = CFS.CodeID and CFS.CodeAbbrv = ''NEG'' inner join ProgramYearRange PYR on PYR.ProgramYearRangeID = POGC.ProgramYearRangeID inner join UserReportingOptions URO on URO.ReportTypeID = PYR.RangeTypeID ' where MetricTypeID = 4340 go update MetricType set InsertParticipantFromWhere = 'from ParticipantXPerformanceOutcomeGroupCount PxPOGC inner join PerformanceOutcomeGroupCount POGC on PxPOGC.PerformanceOutcomeGroupCountID = POGC.PerformanceOutcomeGroupCountID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = POGC.PerformanceOutcomeGroupID and POG.ProgramYearID = @ProgramYearID and POG.PerformanceOutcomeGroupAbbrv in (''A-1(6)'',''A-1(7)'',''A-1(8)'',''A-1(9)'',''A-1(10)'',''A-1(11)'',''A-1(13)'',''A-1(14)'', ''A-1(15)'',''A-1(16)'',''A-1(17)'',''A-1(18)'',''A-1(19)'',''A-1(20)'',''A-1(21)'',''A-1(22)'',''A-1(23)'',''A-1(24)'') inner join WIALXSystem.dbo.Code CFS on POG.FundingStreamTypeID = CFS.CodeID and CFS.CodeAbbrv = ''Adult'' inner join ProgramYearRange PYR on PYR.ProgramYearRangeID = POGC.ProgramYearRangeID inner join UserReportingOptions URO on URO.ReportTypeID = PYR.RangeTypeID ' where MetricTypeID = 4342 go update MetricType set InsertParticipantFromWhere = 'from ParticipantXPerformanceOutcomeGroupCount PxPOGC inner join PerformanceOutcomeGroupCount POGC on PxPOGC.PerformanceOutcomeGroupCountID = POGC.PerformanceOutcomeGroupCountID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = POGC.PerformanceOutcomeGroupID and POG.ProgramYearID = @ProgramYearID and POG.PerformanceOutcomeGroupAbbrv in (''A-1(6)'',''A-1(7)'',''A-1(8)'',''A-1(9)'',''A-1(10)'',''A-1(11)'',''A-1(13)'',''A-1(14)'', ''A-1(15)'',''A-1(16)'',''A-1(17)'',''A-1(18)'',''A-1(19)'',''A-1(20)'',''A-1(21)'',''A-1(22)'',''A-1(23)'',''A-1(24)'') inner join WIALXSystem.dbo.Code CFS on POG.FundingStreamTypeID = CFS.CodeID and CFS.CodeAbbrv = ''DW'' inner join ProgramYearRange PYR on PYR.ProgramYearRangeID = POGC.ProgramYearRangeID inner join UserReportingOptions URO on URO.ReportTypeID = PYR.RangeTypeID ' where MetricTypeID = 4344 go update MetricType set InsertParticipantFromWhere = 'from ParticipantXPerformanceOutcomeGroupCount PxPOGC inner join PerformanceOutcomeGroupCount POGC on PxPOGC.PerformanceOutcomeGroupCountID = POGC.PerformanceOutcomeGroupCountID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = POGC.PerformanceOutcomeGroupID and POG.ProgramYearID = @ProgramYearID and POG.PerformanceOutcomeGroupAbbrv in (''A-1(SS-6)'',''A-1(SS-7)'',''A-1(SS-8)'',''A-1(SS-9)'',''A-1(SS-10)'',''A-1(SS-11)'',''A-1(SS-13)'',''A-1(SS-14)'', ''A-1(SS-15)'',''A-1(SS-16)'',''A-1(SS-18)'',''A-1(SS-19)'',''A-1(SS-20)'',''A-1(SS-21)'',''A-1(SS-22)'',''A-1(SS-23)'',''A-1(SS-24)'') inner join WIALXSystem.dbo.Code CFS on POG.FundingStreamTypeID = CFS.CodeID and CFS.CodeAbbrv = ''Adult'' inner join ProgramYearRange PYR on PYR.ProgramYearRangeID = POGC.ProgramYearRangeID inner join UserReportingOptions URO on URO.ReportTypeID = PYR.RangeTypeID ' where MetricTypeID = 4346 go update MetricType set InsertParticipantFromWhere = 'from ParticipantXPerformanceOutcomeGroupCount PxPOGC inner join PerformanceOutcomeGroupCount POGC on PxPOGC.PerformanceOutcomeGroupCountID = POGC.PerformanceOutcomeGroupCountID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = POGC.PerformanceOutcomeGroupID and POG.ProgramYearID = @ProgramYearID and POG.PerformanceOutcomeGroupAbbrv in (''A-1(6)'',''A-1(7)'',''A-1(8)'',''A-1(9)'',''A-1(10)'',''A-1(11)'',''A-1(13)'',''A-1(14)'', ''A-1(15)'',''A-1(16)'',''A-1(17)'',''A-1(18)'',''A-1(19)'',''A-1(20)'',''A-1(21)'',''A-1(22)'',''A-1(23)'',''A-1(24)'') inner join WIALXSystem.dbo.Code CFS on POG.FundingStreamTypeID = CFS.CodeID and CFS.CodeAbbrv = ''DW'' inner join ProgramYearRange PYR on PYR.ProgramYearRangeID = POGC.ProgramYearRangeID inner join UserReportingOptions URO on URO.ReportTypeID = PYR.RangeTypeID ' where MetricTypeID = 4352 go update MetricType set InsertParticipantFromWhere = 'from TableO_ParticipantXPerformanceOutcomeGroupCount PxPOGC inner join TableO_PerformanceOutcomeGroupCount POGC on PxPOGC.PerformanceOutcomeGroupCountID = POGC.PerformanceOutcomeGroupCountID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = POGC.PerformanceOutcomeGroupID and POG.ProgramYearID = @ProgramYearID and POG.PerformanceOutcomeGroupAbbrv in (''A-1(6)'',''A-1(7)'',''A-1(8)'',''A-1(9)'',''A-1(10)'',''A-1(11)'',''A-1(13)'',''A-1(14)'', ''A-1(15)'',''A-1(16)'',''A-1(17)'',''A-1(18)'',''A-1(19)'',''A-1(20)'',''A-1(21)'',''A-1(22)'',''A-1(23)'',''A-1(24)'') inner join WIALXSystem.dbo.Code CFS on POG.FundingStreamTypeID = CFS.CodeID and CFS.CodeAbbrv = ''Adult'' inner join ProgramYearRange PYR on PYR.ProgramYearRangeID = POGC.ProgramYearRangeID inner join UserReportingOptions URO on URO.ReportTypeID = PYR.RangeTypeID ' where MetricTypeID = 4354 go update MetricType set InsertParticipantFromWhere = 'from TableO_ParticipantXPerformanceOutcomeGroupCount PxPOGC inner join TableO_PerformanceOutcomeGroupCount POGC on PxPOGC.PerformanceOutcomeGroupCountID = POGC.PerformanceOutcomeGroupCountID inner join PerformanceOutcomeGroup POG on POG.PerformanceOutcomeGroupID = POGC.PerformanceOutcomeGroupID and POG.ProgramYearID = @ProgramYearID and POG.PerformanceOutcomeGroupAbbrv in (''A-1(6)'',''A-1(7)'',''A-1(8)'',''A-1(9)'',''A-1(10)'',''A-1(11)'',''A-1(13)'',''A-1(14)'', ''A-1(15)'',''A-1(16)'',''A-1(17)'',''A-1(18)'',''A-1(19)'',''A-1(20)'',''A-1(21)'',''A-1(22)'',''A-1(23)'',''A-1(24)'') inner join WIALXSystem.dbo.Code CFS on POG.FundingStreamTypeID = CFS.CodeID and CFS.CodeAbbrv = ''DW'' inner join ProgramYearRange PYR on PYR.ProgramYearRangeID = POGC.ProgramYearRangeID inner join UserReportingOptions URO on URO.ReportTypeID = PYR.RangeTypeID ' where MetricTypeID = 4356 go