User Profile

Collapse

Profile Sidebar

Collapse
vinayagama
vinayagama
Last Activity: May 29 '13, 10:29 AM
Joined: May 27 '13
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I tried to use the following to update the matched records,

    Code:
    merge into table_A d
     using (select a.toobjectnumber,a.fromobjectnumber,b.trobjectnumber,c.objectnumber,b.eexport_control from relationship_table a, table_A c , table_B b)alg
        on (alg.toobjectnumber = alg.objectnumber AND alg.fromobjectnumber=alg.trobjectnumber)
      when matched then
    update set d.export_control = alg.eexport_control;
    ...
    See more | Go to post
    Last edited by Rabbit; May 28 '13, 04:38 PM. Reason: Please use code tags when posting code.

    Leave a comment:


  • Update a table column with data from other table

    1. I have three table
    a. Relationship table(table A and Table b relationship)
    b. Table A
    c. Table B
    2. Read each record in relationship table and search for combination of table A and table B data
    3. Upon find the combination, update the attributes of table A with table B attribute.
    See more | Go to post
No activity results to display
Show More
Working...