× 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 had problems with the update from a subselect when the file with the new data 
is not one
to one with the old.  In that case, you need to update only the records that 
have a match,
or set the field as "null capable", in this case you may loose data.

Someting like this:

update t1 set data1 = (select data2 from t2 where key2 = t1.key2) where key1 in 
(select
key2 from t2)
________________________________________________________________________________
Weining Xu wrote:

> Yes, all simple update, insert, delete statements
> works.  So far only subselect inside an update
> statement does not work.
> --- "Clapham, Paul" <pclapham@core-mark.com> wrote:
> > Have you already tried just plain "set name = ..."?
> >
> > PC2
> >
> > -----Original Message-----
> > From: Weining Xu [mailto:xu_weining@yahoo.com]
> > Sent: June 6, 2002 09:00
> > To: java400-l@midrange.com
> > Subject: Re: DB2 SQL problem -- Urgent help needed
> >
> >
> > I tried both slash and dot in both strsql and
> > Operations Navigator.  The error is the same.
> >
> > strsql tells that Token dot error occors at "set
> > t1.name ".



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.