Solved

How to view emails in a GFI Database

Posted on 2014-01-06
1
282 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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…
Viewers will learn how to use the Hootsuite Dashboard.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

744 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

16 Experts available now in Live!

Get 1:1 Help Now