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 |
pkipe
Starting Member
6 Posts |
Posted - 2012-04-05 : 17:31:46
|
Given table A as follows:pk_a expiration_date1 1/15/20122 1/15/20123 2/12/2012and table B as follows:pk_b fk_a date_expires1 1 1/15/20122 1 1/15/20133 2 1/15/20124 2 1/15/20135 3 2/12/20116 3 2/12/20127 3 2/12/2013How can I write an update query in SQL that will update A.expiration_date with B.date_expires from the highest B.pk_b for the join between A.pk_a and B.fk_a?Thanks in advance,Pete |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-04-05 : 17:38:57
|
Dupe:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=173329 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-04-06 : 06:51:02
|
Sorry about locking the topic, just noticed the duplicate original question and not the replies in the other thread.Generally we prefer to stick with the original post even if it's in the wrong forum, it lessens confusion over multiple posts.Regarding your question, I posted a possible solution in the original thread. |
|
|
|
|
|