Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Multiple Rows updating
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 05/14/2013 :  07:58:40  Show Profile  Reply with Quote
i have two tables in my database table1 & table2.
Table1 have (id,country_name,country_short_name,country_code)
Table2 have (country_name,country_short_name).
So Table1 have contain lots of data and some country names are repeated in that table.
But Table1 country_short_name rows are null. So i need to update that country_short_name rows.

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 05/14/2013 :  08:04:27  Show Profile  Reply with Quote

SET t1.country_short_name = t2.country_short_name
FROM table1 t1
inner join table2 t2
on t2.country_name = t1.country_name
where t1.country_short_name is null

SQL Server MVP

Edited by - visakh16 on 05/14/2013 08:05:01
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000