Hi,
I have the following data:
create table #temp (filename varchar(20), filedate datetime)
insert into #temp values ('D0062277.001','2005-12-15 08:57:00.000')
insert into #temp values ('D0062277.001','2005-12-15 08:57:00.000')
insert into #temp values ('D0062284.001','2005-12-19 08:31:00.000')
insert into #temp values ('D0062284.001','2013-01-20 08:31:00.000')
insert into #temp values ('D0062288.001','2002-01-25 05:08:00.000')
insert into #temp values ('D0062288.001','2002-01-25 05:08:00.000')
insert into #temp values ('D0062296.001','2005-05-04 11:27:00.000')
insert into #temp values ('D0062296.001','2005-05-04 11:27:00.000')
Each 'Filename' exists more than one time. I would like to pinpoint those files that exist more than once, but where the 'filedate' differs.
For example, 'D0062284.001' exists once with date 2005-12-19 and once with 2013-01-20.
Can anyone think of a way I can do this?
Thanks!
I have the following data:
create table #temp (filename varchar(20), filedate datetime)
insert into #temp values ('D0062277.001','2005-12-15 08:57:00.000')
insert into #temp values ('D0062277.001','2005-12-15 08:57:00.000')
insert into #temp values ('D0062284.001','2005-12-19 08:31:00.000')
insert into #temp values ('D0062284.001','2013-01-20 08:31:00.000')
insert into #temp values ('D0062288.001','2002-01-25 05:08:00.000')
insert into #temp values ('D0062288.001','2002-01-25 05:08:00.000')
insert into #temp values ('D0062296.001','2005-05-04 11:27:00.000')
insert into #temp values ('D0062296.001','2005-05-04 11:27:00.000')
Each 'Filename' exists more than one time. I would like to pinpoint those files that exist more than once, but where the 'filedate' differs.
For example, 'D0062284.001' exists once with date 2005-12-19 and once with 2013-01-20.
Can anyone think of a way I can do this?
Thanks!