If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Informix update table from another table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-03-08, 08:58
swapnilsjadhav swapnilsjadhav is offline
Registered User
 
Join Date: Dec 2008
Posts: 1
I am novice in Informix though I have worked in Microsoft SQL Server.
I want to update a table from the other table in informix. How do I do this?
For example, I can execute a query in SQL Server as

update TableA set orderqty = b.totQty
from TableA as a, TableB as b
where a.shiftdate = b.shiftdate;

Appreciate your valuable input.
Reply With Quote
  #2 (permalink)  
Old 12-03-08, 16:23
ibm.ids ibm.ids is offline
Registered User
 
Join Date: Nov 2008
Posts: 64
This is ANSI syntax for your query:

UPDATE TableA
SET orderqty = (
SELECT totQty
FROM TableB
WHERE TableA.shiftdate = TableB.shiftdate)
;


HTH
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On