|
Well if your dealing with a single huge, nasty SQL statement I'd agree with you. But if you've got a complex statement made up of multiple CTE and UDFs its pretty easy to see intermediate results. Of course the same could be said of RPG using sub procedures. Charles Wilt -- iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121
-----Original Message----- From: rpg400-l-bounces+cwilt=meaa.mea.com@xxxxxxxxxxxx [mailto:rpg400-l-bounces+cwilt=meaa.mea.com@xxxxxxxxxxxx] On Behalf Of Joe Pluta Sent: Wednesday, January 03, 2007 3:58 PM To: 'RPG programming on the AS400 / iSeries' Subject: RE: SQL... MAX AND COUNT?From: Wilt, Charles And yes, I'd agree that it's easy to create a SQL statementthat looksright but isn't. On the other hand, IMHO when an SQL statement is wrong, it's usually obvious from the results; and the waythe resultswrong are usually help clue you in on why the statement iswrong. Onthe other hand, an error in RPG logic is usually harder totrack downsince you are dealing on a per-record basis instead of anentire set. Hmm. To me, it's actually much easier to debug the RPG, especially on very complex SQL statements, because I can much more easily review intermediate steps, whereas with SQL I can only make my analysis based on the final result (which might in turn require dumping the results to an output file and then poring through that to determine what went wrong). I can of course break down the SQL and do it piece by piece, but unlike RPG, as we've seen it's pretty easy for something in one part of an SQL to break something in another part, and that's hard to debug when you can't actually get in the middle of the process. Joe -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
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.