Re: How to select last updated data
- From: "Colin Robinson" <ColinRobinson@xxxxxxxxxxxxxxxxx>
- Date: Wed, 31 Jan 2007 12:26:11 -0000
Use a group by query on Emp_ID, Max (ScanID)
Colin R
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@xxxxxxxxxx> wrote in
message news:e78J9L7CHHA.4952@xxxxxxxxxxxxxxxxxxxxxxx
In Empl_info table I want to collect only last updated employee_info data
per one employee number. Putting time field is not my option.
Somebody mentioned timestamp but I don't quite understand how to use it
in
my situation.
Well, you need something to distinguish different loads. Either is this
batch id, or datetime of the load. Timestamp (sysnonym rowversion) is not
useful in this situation, because SQL Server updates it for every Update
statement, and therefore you can lose your load identification.
--
Dejan Sarka
http://www.solidqualitylearning.com/blogs/
.
- Prev by Date: Re: Delta extract - newbie question
- Next by Date: Re: New Database System Overview
- Previous by thread: Re: Delta extract - newbie question
- Index(es):