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



Is it just me, or does it seem that IBM's method of doing this is far more
complex than SQL Server?



On 1/16/06, rob@xxxxxxxxx <rob@xxxxxxxxx> wrote:
>
> update rob/x1
> set x1.mydec=(select x2.mydec from x2
>              where x2.mychar=x1.mychar AND
>                    x2.mydec<>x1.mydec)
> where x1.mychar in
> (select x1.mychar from x1 INNER JOIN x2
>    on x1.mychar=x2.mychar and x1.mydec<>x2.mydec)
> 1 rows updated in X1 in ROB.
>
> ....+....1....+....2....+...
> MYCHAR                 MYDEC
> A                     1.00
> B                     7.00
> C                     3.00
> ********  End of data  *****
>
> Rob Berendt
> --
> Group Dekko Services, LLC
> Dept 01.073
> PO Box 2000
> Dock 108
> 6928N 400E
> Kendallville, IN 46755
> http://www.dekko.com
>
>
>
>
>
> Ron Adams <rondadams@xxxxxxxxx>
> Sent by: midrange-l-bounces@xxxxxxxxxxxx
> 01/16/2006 04:30 PM
> Please respond to
> Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
>
>
> To
> MIDRANGE-L@xxxxxxxxxxxx
> cc
>
> Fax to
>
> Subject
> Re: SQL UPDATE using INNER JOIN?
>
>
>
>
>
>
> To be more specific, I'm trying to do the equivalent of this on the
> iSeries:
>
>
> update table1
>   set fldX = T2.fldY
> from table1 T1
> inner
> join table2 T2
>    on T1.keyfld = T2.keyfld
>
>
>
>
>
>
> On 1/16/06, Ron Adams <rondadams@xxxxxxxxx> wrote:
> >
> > I'm trying to don an UPDATE to a table using data from another table and
> > using the INNER JOIN clause. Can anyone show me a working example of
> this
> > because I can't seem to get it right.
> >
> >
> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
> list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>
> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
> list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.