Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Compare update on two tables

$
0
0
I have 2 tables. They both have the same fields [OFO_Code] and [Description]

Table 1 is Called Qualification and Table 2 OFO_Code. The second table is a lookup table. The info in Table 1 's description column in some places does not match that of Table 2.

I am trying to loop through these tables to Update the info in Table 1's description to match the correct description in Table 2.
Their are 1417 items in Table 2 and 77000 items in table 1.

There are NO errors when executing, just no update
Here is my code so far:

Code:

Update Qualification SET [Description]  = B.Description    FROM  Qualification A  INNER JOIN OFO_code B ON A.OFO_CODE = B.OFO_CODE WHERE A.OFO_Code IN ('" & OFO & "' )"

Viewing all articles
Browse latest Browse all 13329

Trending Articles