I'm trying to write a query that will do a couple things, first it will pull results from the database and format it by adding all the rows together (for a certain time frame). Second if a certain Category doesn't exist it will label it as 0. These entries won't be there at all if an event didn't happen (so no 0 or null entries, just non-existant). For example, it will search for critical events, if none exist it won't make any entry. If one does exist it will make an entries with a number.
Here's a slightly better scenerio, it's for Symantec Critical System Protection. It makes an entries for a "Warning, Major, Information, Critical" events. I want to grab all those from the SQL data base to show the following for the last 7 days in table format:
Type of Event | Number of Occurances
If there is no entries for a type of event (say no critical happened) it will enter Critical | 0, I have to have it show this for audit reasons saying "it's not there because none happened" isn't good enough. I will be doing this in MSSQL Management Studio (since I can't seem to do it inside the program itself for those events).
I would like to export this to a excel / pdf any type of common format. I hope this makes sense.