× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




I appreciate all the responses.  They were very helpful.

Thanks,

Frank





rob@xxxxxxxxx@midrange.com on 03/30/2005 08:36:00 AM

Please respond to Midrange Systems Technical Discussion
       <midrange-l@xxxxxxxxxxxx>

Sent by:    midrange-l-bounces@xxxxxxxxxxxx


To:    Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
cc:    david@xxxxxxxxxxxx

Subject:    Re: SQL explained


Frank,

Jonathon did a fine job explaining the code.

I probably should have formatted the code differently.  And I did on the
view and the imbedded select statement.  But on the tables I should have
did
CREATE TABLE ROB/CUSTMAST
 (CUSTNO INT NOT NULL,
  SLSPSN INT NOT NULL,
  YTDHG DEC ( 7, 2),
 CONSTRAINT CUSTMAST_CUSTNO PRIMARY KEY (CUSTNO),
 CONSTRAINT CUSTMAST_SLSPSN FOREIGN KEY (SLSPSN)
   REFERENCES ROB/SLSPSNF (SLSPSN)
   ON DELETE NO ACTION
   ON UPDATE NO ACTION)
The only excuse I had not to was that I went under the assumption that
Doug already had the tables built.  Only the view and the imbedded select
was new.  I am glad that you took the time to review it and ask questions.

There are a number of books on iSeries SQL available at:
http://store.midrange.com/

One that I've purchased is
http://store.midrange.com/details.php?ASIN=1882419707
Although the web site seems slightly mucked up.  Why would the used price
be twice the new price?  Autographed?

One of our youngest team members (whose dad also works in the department)
has done some pretty amazing SQL just by using the IBM reference manuals.
That others have pointed out to you are available via infocenter.  The one
benefit of infocenter over hardcopy is that you always get the latest
enhancements.  And y'all know me, I'll always push the envelope on new
stuff.  For example some of the code presented is V5R3.  Prior to V5R3
  LEFT OUTER JOIN CUSTMAST USING (SLSPSN))
Would have had to be written as
  LEFT OUTER JOIN CUSTMAST ON SLSPSNF.SLSPSN = CUSTMAST.SLSPSN)
Now, many people might still have to use this method because (IMNSHO) of a
poor design standard of naming the fields differently.  Example
  LEFT OUTER JOIN CUSTMAST ON SLSPSNF.SLSLSP = CUSTMAST.CSSLSP)

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.