Determine Most Current Record
I have a table that contains information regarding documents being uploaded. Periodically, new documents will be uploaded to "replace" the previous document. So I have a document name and an owner that will have multiple rows, but with different other attribute fields.
I would like to create a view in SQL 2005 that can dynamically determine which document is the most current (determined by the most recently added record ie MAX(ID)).
Basically, in a view I would like to have a field like....
and name this field something like IsCurrent.
IF MAX(ID) for this combination of Document Name & Owner, then true else false
I'm not sure if this is possible or what the syntax would look like.