× 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.



C/EXEC SQL
C+ insert into plline2
C+                               (select * from vdline2 where
C+                                                           (vdlpo conca
C+ t h2item) in (select (pdlpo concat plitem) from plline))
C/END-EXEC

or even

C/EXEC SQL
C+ insert into plline2
C+ (select * from vdline2 a where exists (select * from
C+ plline b where a.vdlpo = b.pdlpo and a.h2item = b.plitem))
C/END-EXEC



The equivalent code in RPG:

          READ VDLINE2               90
*IN90     DOWEQ*OFF
VDKEY     SETLLPLLINEL1              91
*IN91     IFEQ *ON                       If in PLLINE
          WRITEPLLINE2R                  Write to PLLINE2
          ENDIF
          READ VDLINE2               90
          ENDDO

Easier to read, and my initial guess is that the RPG runs a bit quicker.

Maybe I'm daft, but I just don't understand why someone would write SQL for
code like this.

Joe



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.