|
Hi all
when i execute the following statament inside an SQLRPGLE i receive error
26501 (after open) and 42601 after prepare , but if i try to run the same
statement from ACS script SQL function, it works fine ; can some help me to
understand which could be or hot to find the the problem ?
Thanks in advance
SELECT A1DAT,
'A' AS ID,
A1COD,
A1ORA,
IFNULL(CAST(NULL AS DEC(9, 0)), 0) AS AETNR
FROM Mylib.FILE1
WHERE (A1DAT BETWEEN 20220525 AND 20220525
OR A1DAT = 00000000)
AND A1NOM <> ''
AND A1NOT <> 'XXXXXXXXXX'
AND A1NOT <> '**********'
AND A1NOT <> 'XXXXXXXXX'
AND A1COD IN (
'ZZZ',
'AAA',
'CCC',
'ABC'
)
UNION ALL
SELECT AETDDS AS A1DAT,
'B' AS ID,
IFNULL(CAST(NULL AS VARCHAR(3)), ' ') AS A1COD,
IFNULL(CAST(NULL AS DEC(6, 0)), 0) AS A1ORA,
AETNR
FROM mylib.file2
WHERE AETCBL = 'S'
AND (AETDDS BETWEEN 20220525 AND 20220525)
ORDER BY 1,
4
FOR READ ONLY
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.