Admin Alert: One Common Cure for SQL0901 Package Errors - IT Jungle
The SQL0901 error is an incredibly frustrating error that occurs with i5 ODBC, OLE DB, and JDBC connections. Because SQL0901 is a general SQL error, it can be difficult to diagnose and harder to solve. This week I will look at one specific SQL0901 scenario, where the failure occurs inside SQL’s extended dynamic package support,
SQL “Lateral Join” … do you know this SQL join? (EN) – BlogFaq400
Lateral Join SQL DB2 for i: not everybody knows about it but it’s very powerful in our queries.
We want to get out one row only for each carmaker with the most sold model.
CROSS JOIN LATERAL:
SELECT a.Brand, Country, Modell, Year, Quantity FROM Faq400.AutoBrands A
cross JOIN LATERAL
(SELECT * from faq400.AutoStats stat
WHERE Year=2018 and A.idBrand=stat.IdBrand
order by Quantity desc
FETCH FIRST 1 ROW ONLY
) B ;
Midrange Guru
e you are processing, so the third record in the file might not be the third record you entered; it might have been placed there yesterday because someone deleted the original third record and your file is set to reuse deleted space. So, if you really want to guaran