Need SQL experts. v7.2
Getting this when I try to refresh the MQT.
Number of records retrieved is not correct.
Result of SELECT more than one row.
Result of SELECT more than one row. Number of records retrieved is not correct.
Result of SELECT more than one row.
Result of SELECT more than one row.
This MQT has worked perfectly for years. Then it started throwing this error ONLY when run in Batch. Today it started throwing the error ALL the time. I know it could be a data issue, but I can't figure how ANY of these selects could cause this error. Suggestions on where to look?
Below code is a snip of EVERY line that has any kind of SELECT statement. Shouldn't the sum() and max() handle any possible duplicates?
Getting this when I try to refresh the MQT.
Number of records retrieved is not correct.
Result of SELECT more than one row.
Result of SELECT more than one row. Number of records retrieved is not correct.
Result of SELECT more than one row.
Result of SELECT more than one row.
This MQT has worked perfectly for years. Then it started throwing this error ONLY when run in Batch. Today it started throwing the error ALL the time. I know it could be a data issue, but I can't figure how ANY of these selects could cause this error. Suggestions on where to look?
Below code is a snip of EVERY line that has any kind of SELECT statement. Shouldn't the sum() and max() handle any possible duplicates?
Code:
CREATE TABLE GPSVIEWS/MBC6REPV1F AS (SELECT then coalesce((select max(MM.ODUDT) from MOMAST MM ,coalesce((select sum(CNAMQT) from MBCNREPALL where T5.ADAENB=CNAENB AND coalesce((select max(CNKZNB) from MBCNREPALL where T5.ADAENB=CNAENB AND (Select coalesce(sum(MM.ORQTY+MM.QTDEV-MM.QTSCP-MM.QTYRC),0) (Select coalesce(sum(PO.QTYOR+PO.QTDEV-PO.QTSCP-PO.STKQT),0) (select coalesce(sum(MOHTQ),0) from ITEMBL IT2 where IT2.ITNBR = T2.CDAITX coalesce((select max(CKCZCD) from MBCKREP where CKAENB = T2.CDAENB and (select max(CKCZCD) from MBCKREP where CKAENB = T2.CDAENB and (Select sum(TL.OTOrdTotal) from OrderTotal TL where T2.CDDCCD = '1' When (Select sum(TL.OTOrdTotal) from OrderTotal TL where T2.CDDCCD = '1' When (Select sum(TL.OTOrdTotal) from OrderTotal TL where T2.CDDCCD = '1' When (Select sum(TL.OTOrdTotal) from OrderTotal TL where T2.CDDCCD = '1' When (Select sum(TL.OTOrdTotal) from OrderTotal TL where T2.CDDCCD = '1' When (Select sum(TL.OTOrdTotal) from OrderTotal TL where T2.CDDCCD = '1' When (Select sum(TL.OTOrdTotal) from OrderTotal TL where T2.CDDCCD = '1' When (Select sum(TL.OTOrdTotal) from OrderTotal TL where T2.CDDCCD = '1' When (Select sum(TL.OTOrdTotal) from OrderTotal TL where T2.CDDCCD = '1' When (Select sum(TL.OTOrdTotal) from OrderTotal TL where T2.CDDCCD = '1'
Comment