|
Dear All,
I' m asking your opinion about the following behavior.
First SQL
The follow sql does not work. It's return SQL0122 error "Column *N or expression in select is not valid"
Select 'K' AS TIPO , 1 AS PERIODO , TTBACK CONCAT TTBDCK AS ELEMENTO1
, TTBPCK AS ELEMENTO2 , count(*) AS QUANTITA ,
IFNULL((Select COUNT(*) FROM SNVEI0F INNER JOIN IBM_DAT/SNCON0F
ON B5CSCK = BNCSCK INNER JOIN IBM_DAT/SNSLL0F ON B5BACK = IMBACK
and IMKDCK = 'DV1' INNER JOIN IBM_DAT/SNSLR0F ON
IMKDCK = N2KDCK and IMCCKK = N2CCKK WHERE B5BACK CONCAT
B5BDCK = TTBACK CONCAT TTBDCK AND B5BPCK = TTBPCK AND
B5CFDT <= 1230131 AND B5CWDT > 1230131 AND B5CFDT <> 0 AND B5BWST
IN ('D') AND B5JDST in (' ' , 'H') AND B5BACK IN ('A01')
) , 0) AS QUANTITAORDINI ,
0 AS QUANTITALIBERA FROM IBM_DAT/SNCID0F INNER JOIN
IBM_DAT/SNCON0F ON TTCSCK = BNCSCK INNER JOIN IBM_DAT/SNSLL0F
ON TTBACK = IMBACK and IMKDCK = 'DV1' INNER JOIN IBM_DAT/SNSLR0F
ON IMKDCK = N2KDCK and IMCCKK = N2CCKK WHERE TTH2DS >= 20230101
AND TTH2DS <= 20230131 AND TTBACK IN ('A01')
GROUP BY 'K', 1 , TTBACK CONCAT TTBDCK , TTBPCK
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.