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 |
|
carau2007
Starting Member
31 Posts |
Posted - 2012-02-08 : 10:11:03
|
| Hi,Below is my table. I need to update a table that will insert the File_ID in the File_Parent_ID column only if the case has a File_parent_Number that corresponds to File_Number. How do I do this?Example: Row 13 should have a 12 in File_Parent_IDFile_ID / File_Number / File_Parent_Number / File_Parent_ID12-----------1004 13-----------1005-------------1004 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-02-08 : 10:17:55
|
[code]update tset File_Parent_ID = p.File_IDfrom yourtable t inner join yourtable p on t.File_Parent_Number = p.File_Number[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
carau2007
Starting Member
31 Posts |
Posted - 2012-02-08 : 11:06:00
|
| Thanks! |
 |
|
|
|
|
|