KI (All) Analytics - error message "Subquery returned more than 1 value" appears when setting up a financial year
Issue
Support has confirmed that during the setup of Exo Business Analytics Financial years, periods and Running Days, an error may come up when setting the months of the Financial Year.
This can happen even when working with Motopartz:
"Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression."
To replicate the issue, set up a Financial Year in Analytics. Repeat for a second year:
The error may appear when there is more than one financial year within the current date and you carry out a transaction in the current period
Cause
Analytics runs a select query where all the data from the MANREP_PERIOD table is pulled in, but can be done so twice
Select *
From MANREP_PERIOD
WHERE (Parent_Period_SeqNo =
(
select PERIOD_SEQNO
from MANREP_PERIOD
WHERE (Parent_Period_SeqNo = 0)
and (GETDATE() between STARTDATE and ENDDATE)
)
)
and (GETDATE() between STARTDATE and ENDDATE)
Resolution
Changing the dates in the Setup will solve the issue.