org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLException: Invalid object name 'TimelineData'.
### The error may exist in com/agco/map/dealer/financialSavings.xml
;WITH FiscalSavingsStart AS
(
SELECT
PPT.PrjtPartsRefId,
PPT.LatestDate AS [LatestDate-FiscalSavingsStart],
PPT.Completed AS [Completed-FiscalSavingsStart]
FROM ProjectPartsTimelines PPT
JOIN ProjectTimelinesMaster PTM ON PTM.PrjtTimeLineId = PPT.PrjtTimeLineId
JOIN ProjectAttributesMaster PAM ON PAM.PrjtAtrbtId = PTM.PrjtAtrbtId
WHERE PAM.PrjtAtrbtName = 'Fiscal Savings Start'
),
TimelineData AS
(
SELECT
ISNULL(fss1.PrjtPartsRefId, fss2.PrjtPartsRefId) AS PrjtPartsRefId,
FSS1.[LatestDate-FiscalSavingsStart],
FSS1.[Completed-FiscalSavingsStart],
FSS2.[LatestDate-FinanceSavingsValidation],
FSS2.[Completed-FinanceSavingsValidation]
FROM FiscalSavingsStart FSS1
FULL OUTER JOIN FinanceSavingsValidation FSS2 ON FSS1.PrjtPartsRefId =
FSS2.PrjtPartsRefId
)
SELECT DISTINCT PP.PartNumber
FROM TimelineData TD
JOIN ProjectParts PP ON PP.PrjtPartsRefId = TD.PrjtPartsRefId
JOIN ProjectTracking PT ON PT.ProjectNumber = PP.ProjectNumber
JOIN ProjectsType PST ON PST.ProjectId = PT.ProjectType
JOIN Factory FA on FA.FactoryCode = PP.FactoryCode
LEFT JOIN CountryCodes CC ON CC.CountryId = PP.NewSupplierRegion
LEFT JOIN [User] U ON U.UserId = PT.SCMLead
WHERE TD.[Completed-FiscalSavingsStart] = 'T'
AND
TD.[Completed-FinanceSavingsValidation] !='T'
AND
PP.[Completed-ProjectCancelled]!='T'
### Error querying database. Cause: java.sql.SQLException: Invalid object name 'TimelineData'.
### The error may exist in com/agco/map/dealer/financialSavings.xml
;WITH FiscalSavingsStart AS
(
SELECT
PPT.PrjtPartsRefId,
PPT.LatestDate AS [LatestDate-FiscalSavingsStart],
PPT.Completed AS [Completed-FiscalSavingsStart]
FROM ProjectPartsTimelines PPT
JOIN ProjectTimelinesMaster PTM ON PTM.PrjtTimeLineId = PPT.PrjtTimeLineId
JOIN ProjectAttributesMaster PAM ON PAM.PrjtAtrbtId = PTM.PrjtAtrbtId
WHERE PAM.PrjtAtrbtName = 'Fiscal Savings Start'
),
TimelineData AS
(
SELECT
ISNULL(fss1.PrjtPartsRefId, fss2.PrjtPartsRefId) AS PrjtPartsRefId,
FSS1.[LatestDate-FiscalSavingsStart],
FSS1.[Completed-FiscalSavingsStart],
FSS2.[LatestDate-FinanceSavingsValidation],
FSS2.[Completed-FinanceSavingsValidation]
FROM FiscalSavingsStart FSS1
FULL OUTER JOIN FinanceSavingsValidation FSS2 ON FSS1.PrjtPartsRefId =
FSS2.PrjtPartsRefId
)
SELECT DISTINCT PP.PartNumber
FROM TimelineData TD
JOIN ProjectParts PP ON PP.PrjtPartsRefId = TD.PrjtPartsRefId
JOIN ProjectTracking PT ON PT.ProjectNumber = PP.ProjectNumber
JOIN ProjectsType PST ON PST.ProjectId = PT.ProjectType
JOIN Factory FA on FA.FactoryCode = PP.FactoryCode
LEFT JOIN CountryCodes CC ON CC.CountryId = PP.NewSupplierRegion
LEFT JOIN [User] U ON U.UserId = PT.SCMLead
WHERE TD.[Completed-FiscalSavingsStart] = 'T'
AND
TD.[Completed-FinanceSavingsValidation] !='T'
AND
PP.[Completed-ProjectCancelled]!='T'
No comments:
Post a Comment