Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Update multiple rows in a table at a time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
program developer

New User


Joined: 15 Nov 2005
Posts: 3

PostPosted: Tue Nov 15, 2005 1:09 pm    Post subject: Update multiple rows in a table at a time
Reply with quote

Hi,
I have the Table structure as :
emp table
eid ename
100 abc
200 def
101 cba

is it possible to update the "ename" column in single update query?
like say for Eid =100 "abc" i want to update as "cba" and
for Eid= 101 "cba" as "abc" in a single update.
How can i do that?


Thank you in advance.
Back to top
View user's profile Send private message

mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 238
Location: USA

PostPosted: Wed Nov 16, 2005 6:41 pm    Post subject:
Reply with quote

program developer,

what is the key of the table??
Back to top
View user's profile Send private message
program developer

New User


Joined: 15 Nov 2005
Posts: 3

PostPosted: Fri Nov 18, 2005 6:34 pm    Post subject: what is the key of the table??
Reply with quote

Eid is the key.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Can we combine the rows with same key... V S Amarendra Reddy DB2 12 Fri Dec 01, 2017 10:29 pm
No new posts Comparision with current time arunsoods DFSORT/ICETOOL 5 Thu Nov 09, 2017 10:37 am
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Updating multiple counts in trailer!! Vignesh Sid SYNCSORT 4 Mon Nov 06, 2017 1:04 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us