Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How best to report changes to data Expand / Collapse
Author
Message
Posted Thursday, January 10, 2013 12:19 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, October 21, 2014 7:02 AM
Points: 12, Visits: 84
Hi all

I'm looking for some inspiration on how best to report changes that have been made to records in a SQL database.

To put this in context, we're looking to build a tool where reporting users can see changes made to hotel rooming requests, so they can ensure the hotel updates their records with the new requirements. We're looking to do it at field level, i.e. not just show that Mr Smith has changed his hotel request, but that he changed just his check-in date, and show what the previous value was.

I'm aware of various techniques for automatically recording changes to data in SQL, but have not seen many examples of how best to report them and allow report users to query the changes.

I'd be particularly interested in hearing about how forum members might have tackled the UI when they've got multiple users looking for different types of changes or who are interested in a variable date/time ranges. Or perhaps you've seen a great change tracking report in an app you use.

I've not posted this as an SSRS question because we could equally build a web tool to query/display the data.

Thanks for your suggestions

Nick
Post #1405595
Posted Thursday, January 10, 2013 12:35 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 9:58 AM
Points: 13,872, Visits: 9,600
How you record the changes is pretty key to how you report them, but not necessarily critical.

If you want to regularly query the data, then you either need "active auditing" (usually done via triggers), or Change Data Capture (Enterprise-edition only, unless I'm mistaken). Either of those will generate a set of queriable tables that you can base reports off of.

Depending on how flexible you need the reports, either pre-built reports in SSRS, or something really flexible like Excel pivot tables (or the Sharepoint version of these), would be worth looking into.

If the primary goal is to see the history of a room, that would easily be done via SSRS. A drill-down report, where you pick a hotel, then a room, then details of changes, would probably get what's needed. History of a guest would be done via some sort of CRM-type application. Aggregations like "how many reservations were cancelled per room, per hotel, per month" would probably best be done via pivot tables.


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #1405603
Posted Thursday, January 10, 2013 12:39 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:11 PM
Points: 12,953, Visits: 32,482
there's a codeproject which adds a CDC equivalent to a standard edition SQL server installation you could look at as well:

it creates a utility schema instead of a cdc schema.

http://standardeditioncdc.codeplex.com/


Lowell

--There is no spoon, and there's no default ORDER BY in sql server either.
Actually, Common Sense is so rare, it should be considered a Superpower. --my son
Post #1405604
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse