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 |
|
velvettiger
Posting Yak Master
115 Posts |
Posted - 2010-09-15 : 13:56:51
|
| Hi there,I have a table that have many different rows and would like to select the most recently updated row. Any ideas.Thanks,Amanda |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
jcelko
Esteemed SQL Purist
547 Posts |
Posted - 2010-09-15 : 14:27:22
|
quote: Originally posted by velvettiger I have a table that have many different rows and would like to select the most recently updated row.
That question makes sense for a magnetic tape file and makes no sense for a table. SQL is a set-oriented language and rows are updated AS ENTIRE SETS, ALL AT ONCE. Also, the rows in a table all have the same structure; you cannot have "many different rows" in a table.--CELKO--Books in Celko Series for Morgan-Kaufmann PublishingAnalytics and OLAP in SQLData and Databases: Concepts in Practice Data, Measurements and Standards in SQLSQL for SmartiesSQL Programming Style SQL Puzzles and Answers Thinking in SetsTrees and Hierarchies in SQL |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-09-16 : 12:34:46
|
quote: Originally posted by velvettiger Hi there,I have a table that have many different rows and would like to select the most recently updated row. Any ideas.Thanks,Amanda
are you using sql 2008 and is there by any chance change tracking enabled?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|