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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Comparing records

Author  Topic 

gregmcc
Starting Member

1 Post

Posted - 2009-09-26 : 15:49:01
I've got a application that dumps values to a SQL table - each time the program is run for example it writes the following to a SQL table

date, server, share

So it will have values like:
1/2/2009 xp share1
1/2/2009 win2003 share1
2/2/2009 xp share1
2/2/2009 win2003 share2

What am I trying to do is write some TSQL to compare the permission values of one date against another to see if anything has changed. In the above example the share1 on win2003 has been changed to share2

How would I even got about this?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-09-29 : 01:06:55
[code]
select server
from yourtable
group by server
having count(distinct date)>1
and count(distinct share)>1
[/code]
Go to Top of Page
   

- Advertisement -