5 pts.
 Need help with SQL commands
hye there i need some guidance on sql command. i accidently update all data in 1 table to be as one data only. may i know how i want to revert back to the previous data. or at least what is the sql command to use to make the data in that table updated according to their own data by referring to another table. fyi, the another table has one column which match another column in that affected table. Thank you in advanced for ur help....

Software/Hardware used:
ASKED: January 30, 2009  5:29 AM
UPDATED: February 2, 2009  5:14 PM

Answer Wiki:
You will need to key off a common field and replace the bad data in the first table with the corresponding good data from the second table. To illustrate: <pre> Table 1 Table 2 ---------- ------------ Table1.Name Table2.Name Table1.Address Table2.Address Table1.Phone Table2.Email </pre> Use a query similar to this: UPDATE Table1 SET Table1.Address = Table2.Address FROM Table1 INNER JOIN Table2 on (Table1.Name = Table2.Name) Best wishes, Daniel
Last Wiki Answer Submitted:  February 2, 2009  5:14 pm  by  SANManJax   300 pts.
All Answer Wiki Contributors:  SANManJax   300 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _