Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us