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


  • Subject: RE: UPDATE IN STRSQL USING JOINED FILES
  • From: Buck Calabro <mcalabro@xxxxxxxxxxxx>
  • Date: Tue, 3 Aug 1999 08:43:55 -0400

I don't think that V3R7 supports updating one table from another.  You could
always fake it with a construct like:

crtdupobj file01 *file newobj(temp)
insert into temp * (select FLD101,FLD102,FLD201 from FILE01, 
    FILE02 where KEY01=KEY02)
cpyf temp file01 mbropt(*replace)

The idea is to make a JOIN of the two files, insert the merged records into
a temporary file that you copy back to your primary file.

Buck Calabro
Billing Concepts Albany, NY
mailto:mcalabro@commsoft.net

> -----Original Message-----
> From: oludare 
> Sent: Monday, August 02, 1999 5:20 PM
> To:   RPG400-L@midrange.com
> Subject:      Re: UPDATE IN STRSQL USING JOINED FILES
> 
> I am on V3R7 and the statement is invalid "bsc4tx is invalid. Valid
> tokens: + ) -"
>  
>  
> ----- Original Message ----- 
> From: Buck Calabro < mcalabro@commsoft.net <mailto:mcalabro@commsoft.net>>
> To: < RPG400-L@midrange.com <mailto:RPG400-L@midrange.com>>
> Sent: Monday, August 02, 1999 3:11 PM
> Subject: RE: UPDATE IN STRSQL USING JOINED FILES
> 
> > I am on V4R3 and this works for me:
> > update actphy01 set b1u2tx = (select bsc4tx
> >  from cusphy01 where bslknb = b1lknb)                                
> > 
> > More information on SQL programming can be found at:
> >
> <http://publib.boulder.ibm.com:80/cgi-bin/bookmgr/BOOKS/QB3AQ802/CCONTENTS
> >
> > 
> > Section 5.2 of the V4R3 manual has a lame example of how to do it.  To
> my
> > knowledge, you can't update a JOIN table.
> 
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---END



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.