Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

How to view emails in a GFI Database

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
BCSITS
Asked:
BCSITS
1 Solution
 
Barry CunneyCommented:
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now