SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How best to report changes to data


How best to report changes to data

Author
Message
nick-1043370
nick-1043370
Grasshopper
Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)

Group: General Forum Members
Points: 24 Visits: 91
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
GSquared
GSquared
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23303 Visits: 9730
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
Lowell
Lowell
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27976 Visits: 39922
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

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search