Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
threeonethree
Starting Member
2 Posts |
Posted - 2010-09-28 : 09:47:11
|
| i have two tables named tcl and circuits in mssql ..table named tcl with serial as primary key tcl-----------------------------serial popn backboneissue1 abc ----2 xyz ----3 abc ----n xyz ------------------------------------table named circuits with popname as primary keycircuits----------------------popname issuedetailabc text for abcxyz text for xyzhow do i copy text in circuits.issuedetail to tcl.backboneissue where circuits.popname and tcl.popn match?the resulting table tcl should look liketcl------------------------------serial popn backboneissue1 abc text for abc2 xyz text for xyz3 abc text for abcn xyz text for xyzplease help |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2010-09-28 : 09:55:09
|
| update tset backboneissue = c.issuedetailfrom tcl t join circuits c on t.popn = c.popnameHarsh Athalyehttp://www.letsgeek.net/ |
 |
|
|
threeonethree
Starting Member
2 Posts |
Posted - 2010-09-28 : 12:23:38
|
| i used this query on 2 small tables that i created and it worked great. but then i imported large tables from excel to microsoft sql 2005 and when i use this query it says 0 rows affected..what could be the problem ? could it be the datatypes cudnt be compared?the query im using now isupdate tcl set backboneissues = backbone.issue from tcl join backbone on tcl.pop=backbone.pop;please help me troubleshoot this.. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-09-28 : 15:28:54
|
could it be the datatypes cudnt be compared?How can we know that? We don't know anything about your tables. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
tosscrosby
Aged Yak Warrior
676 Posts |
Posted - 2010-09-28 : 15:39:27
|
| And if they are the same, you obviously don't have any matches where tcl.pop=backbone.popTerry-- You can't be late until you show up. |
 |
|
|
|
|
|