Microsoft
Software
Hardware
Network
Question : MS SQL 2005 Table Map.
I have the table1 is like this:
Code Name
1 A
2 B
3 C
4 D
5 E
6 F
7 G
and I have another table2:
Code Name
NULL A
NULL B
NULL C
NULL A
NULL E
NULL G
NULL G
So I want to update the code column of the table2:
-->
Code Name
1 A
2 B
3 C
1 A
5 E
7 G
7 G
Please help me, how can I do that?
Answer : MS SQL 2005 Table Map.
oops..
update table2
set Code = (select top 1 table1.Code from table1 where table2.name=table1.name)
Random Solutions
Save only sends e-mail with removed attachment again
Remove row if column B and C are empty
Transaction in entity framework
How to watch netflix on google chrome on OS X?
Cant install fonts on a Mac
Changing Server Name with Exchange 2010 Installed
better way to retreive a value for the last entry in a table
new keyboard not recognised before logon
how to do selective sorting based on contents of a column
Upgrade PHP to 5.3 version (or 5.2 eventually) on Plesk 9.5.2