|
UPDATE table-name
SET column-1 = value-1,
column-2 = value-2, ...
WHERE search-condition ...
For more information, see --> DB2 for OS/400 SQL Programming
eric.delong@pmsi-services.com
______________________________ Reply Separator _________________________________
Subject: Select & Update
Author: <MIDRANGE-L@midrange.com > at INET_WACO
Date: 10/29/98 4:48 AM
Hi,
I have a situation wherein I do'nt know how to do that. The thing is , I
have 2 tables Table A & Table B.
Table A (in library A) Table B(in
library B)
----------
-----------
Field A Field
C
Field B Field
D
Field E Field
E
Field F
Now I want to select all fields of table A and update field A with
Field C and Field B with Field D. When I try to do this via Interacive
SQL , I get an error message saying that an Update to clause cannot be
used with a Select statement. I tried SQLRPG through cursors but the
result was the same. I will be happy if any one may be able to throw
some light on how to do this. I use V4R1.
Thanks.
Prakash.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.