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 |
|
jim_jim
Constraint Violating Yak Guru
306 Posts |
Posted - 2010-07-30 : 08:55:47
|
| I am trying to update a test table from the production table by comparing a text column.The table has 500 recordsCan someone please send me the script |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2010-07-30 : 09:30:43
|
| ummmm...want to supply us with some details?Like are the Prod and Test instance on the same server or different servers?How about the DDL of the 2 tablesDo you really mean a text column datat type or just a char or varchar data type.How many columns do you need o compareWhen you do the compare, HOW do you want to compare?You know...little details like thatmy usb esp port is broken right nowBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
 |
|
|
jim_jim
Constraint Violating Yak Guru
306 Posts |
Posted - 2010-07-30 : 09:53:31
|
| The Prod database and the test database are on differant servers,but Iam going to copy the data from the prod table to excel and create a test table in the test database to compare and update.Iam not sure what you meant by DDL of two tables(Iam new SQL programming Sorry)The Column Iam trying to compare is of varchar datatype.I will have to compare only 1 column with has 300 records When I want to compare I want to compare the Column A of the prod with column A of test and update column B of testThanks |
 |
|
|
jim_jim
Constraint Violating Yak Guru
306 Posts |
Posted - 2010-07-30 : 10:39:21
|
| update Table ASetTableA.ColumnA = TableB.ColumnA whereTableA.ColumnB= TableB.ColumnBI used the above query an getting The multi-part identifier could not be bound errorI know we have to create aliasing for the above query but not whereCan someone please help |
 |
|
|
jim_jim
Constraint Violating Yak Guru
306 Posts |
Posted - 2010-08-11 : 11:10:19
|
| I was able to fiure it out and update my tables |
 |
|
|
|
|
|