Solved

How to view emails in a GFI Database

Posted on 2014-01-06
1
283 Views
Last Modified: 2014-01-12
Hi all,

I am trying to find out how many incoming/outgoing emails are in a particular GFI Mail Archiver database we have but i would like to complete this at the SQL level.  The reason being that mounting and unmounting databases within GFI is time consuming.

Does anyone know how to query a database for this type of information?  I am unfamiliar with SQL queries as well so all help is greatly appreciated

We are running SQL 2005 R4 on Windows 2008 R2 Standard

Kind Regards,
0
Comment
Question by:BCSITS
1 Comment
 
LVL 17

Accepted Solution

by:
Barry Cunney earned 500 total points
ID: 39765444
Hi BCSITS,
The following is the type of thing you will have to do in SQL(SQL Server Management Studio):

SELECT
SUM(CASE WHEN p.Direction = 1 THEN 1 ELSE 0 END) [Incoming_Count]
,SUM(CASE WHEN p.Direction = 2 THEN 1 ELSE 0 END) [Outgoing_Count] 
FROM dbo.meces_processed p
WHERE [datetime] BETWEEN '2013-12-01' AND '2013-12-31'

Open in new window


Please try this and then come back with any further questions
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now