User Profile

Collapse

Profile Sidebar

Collapse
rickcf
rickcf
Last Activity: Nov 10 '09, 04:17 PM
Joined: Nov 9 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • rickcf
    replied to UPDATE and SELECT Combination
    Perfect Thanks!

    Perfect! Just the start I needed! Here is the working code I got to work in case anyone else should need it:


    update tablea
    set tablea.fielda = X.newfield from
    (select t2.oldfield, t2.newfield from tablea t1
    inner join tableb t2
    on t1.fielda = t2.oldfield) X
    where tablea.fielda = X.oldfield


    Thanks!

    Rick
    See more | Go to post

    Leave a comment:


  • rickcf
    started a topic UPDATE and SELECT Combination

    UPDATE and SELECT Combination

    I have two tables. Table A is the main table I need to update and table B is the update table with the new data. Table B contains only two fields- fielda (also contained in table A for the linking but also is the field that needs changed) and a second field (fieldb) which is the NEW value of fielda that I need to change in TableA. Thus I need a combination UPDATE/SELECT statement to link the two tables togeather to update table A with the new...
    See more | Go to post
No activity results to display
Show More
Working...