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 > update query in informix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-01-06, 11:42
dbatlanta dbatlanta is offline
Registered User
 
Join Date: Dec 2005
Posts: 11
update query in informix

Hi All,

I am trying to update a table. I am putting a calculated field in a temp table. and I am updating the other table with the new calculated field.

I tried this syntax:

update table A
set A.col=B.col
from B(temp table)
where A.colA=B.colA

but I am having an error.


Thank you for your help in advance.
Reply With Quote
  #2 (permalink)  
Old 02-01-06, 15:01
mjldba mjldba is offline
Registered User
 
Join Date: Dec 2003
Location: North America
Posts: 139
try this:

update table A
set A.col = (select B.col
from table B
where A.colA=B.colA)
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