1 Using a SQL Filter in Outlook 2002/2003 Views. 2 Defining the Problem The Task at Hand



Similar documents
Setting up your own Computer as an outgoing SMTP Mail Server

1 Introduction. 2 The Importance of Follow Up

1 Introduction. 2 The Advantages of Maintaining your Contacts in Outlook. 1. Contact Management Functionality. 2. Familiarity/Ease of Use

ExchangeWise (Pty) Ltd Page 1

MX-Contact Instruction Sheet: Importing Data Business Contact Manager

1 Introduction. 2 What is MYOB. 3 What is MX-Contact. 4 Integration with MYOB

The MX-Contact Sales Module Overview

Microsoft. Outlook ADVANCED FEATURES AND FUNCTIONS

Quick Start User Guide

Junk Settings. Options

Outlook / Exchange Server to Database Sychronization Utility

Cal Answers Analysis Training Part I. Creating Analyses in OBIEE

USING MS OUTLOOK. Microsoft Outlook

Outlook 2007: Managing your mailbox

Outlook Today. Microsoft Outlook a different way to look at E. By Microsoft.com

USING MS OUTLOOK WITH FUS

USING OUTLOOK WITH ENTERGROUP. Microsoft Outlook

OLAP Cube Manual deployment and Error resolution with limited licenses and Config keys

Microsoft Outlook Effective Inbox Organization

Tutorial 3. Maintaining and Querying a Database

Microsoft Office 2010

Google Drive: Access and organize your files

1 Overview. 2 The Problem. 3 The Solution Microsoft Outlook. Outlook CRM and Contact Management Keeping It Simple

Microsoft Office Access 2007 which I refer to as Access throughout this book

Netmail Search for Outlook 2010

Document Management. For Microsoft Dynamics CRM 2013

REDUCING YOUR MICROSOFT OUTLOOK MAILBOX SIZE

GETTING STARTED WITH SQL SERVER

MS OUTLOOK

3 What s New in Excel 2007

HIC.SOAP Network User Instructions last updated June 22, :39 AM

Microsoft Outlook 2013

An Introduction to Customer Relationship Management Software

Address Collector. - Tutorial -

Staying Organized with the Outlook Journal

INTERSPIRE MARKETER

Acclipse Document Manager Integrating Outlook Contacts

Outlook 2011 for Mac

Introduction. Creating an Archive file TO CREATE AN ARCHIVE FOLDER ON YOUR H: SPACE: Guide to Outlook 2010: Archiving

Configuring Outlook 2013 For IMAP Connections

Microsoft Access 2010 handout

Archiving - Outlook 2003

Division of Student Affairs Quota Practices / Guidelines

1 Overview. 2 The Problem. Why CRM Projects Fail User Acceptance is the Key!

Migrate from Outlook Express to Windows Live Mail

TortoiseGIT / GIT Tutorial: Hosting a dedicated server with auto commit periodically on Windows 7 and Windows 8

Tutorial 3 Maintaining and Querying a Database

Accessing Your Database with JMP 10 JMP Discovery Conference 2012 Brian Corcoran SAS Institute

CONTACT DATABASES IN MICROSOFT OUTLOOK

Novell ZENworks Asset Management 7.5

Access Tutorial 3 Maintaining and Querying a Database. Microsoft Office 2013 Enhanced

Excel for InterAction Reporting. Using Excel to report on InterAction System Data. Introduction. Extracting the data

Create a New Database in Access 2010

Microsoft Office 365 Portal

Introduction to Microsoft Access XP

Introduction to Microsoft Access 2003

Adding Digital Signature and Encryption in Outlook

1. Starting the management of a subscribers list with emill

Microsoft Access 3: Understanding and Creating Queries

How To Filter Spam With Thunderbird On A Pc Or Macintosh (Sailor) On A Macintosh Or Macbook) On Pc Or Ipa (Macintosh) On An Ipa Or Ipam (Soulbird) On Windows

Filtering with Microsoft Outlook

General Product Questions Q. What is the Bell Personal Vault Vault?...4. Q. What is Bell Personal Vault Backup Manager?...4

OUTLOOK 2003: HOW TO GET OUT OF JAIL

- Training. Getting Started with Outlook Information Technology Services - Training The University of Texas at Austin

Egress Switch Encryption User Guide

CommuniGate Mail Archiving and Cleanup with Outlook 2007

Business Objects. Report Writing - CMS Net and CCS Claims

Organizing and Managing

Using Microsoft Office to Manage Projects

Cal Answers Analysis Training Part III. Advanced OBIEE - Dashboard Reports

Contents. Changing Your Outlook View To Folder List. Adding Exchange Server Quota Info To The Status Bar. See Quota Info

Technical Bulletin. SQL Express Backup Utility

SUPEROFFICE 7 ONLINE. t e s t s

Microsoft Dynamics CRM Clients

You must have at least Editor access to your own mail database to run archiving.

Outlook Managing Your Items

The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.

Recalling A Sent Message in Outlook 2010

FileMaker Pro and Microsoft Office Integration

My Contact Management and Reporting Features. The New Look & Feel

Search help. More on Office.com: images templates

Law School Computing Services User Memo

Using Form Scripts in WEBPLUS

Google Apps Migration

WINDOWS LIVE MAIL FEATURES

Finding and Opening Documents

SAP Digital CRM. Getting Started Guide. All-in-one customer engagement built for teams. Run Simple

CHAPTER 8: MANAGING LEADS

Microsoft Outlook Quick Reference Sheet

Using Excel As A Database

Outlook Web App McKinney ISD 5/27/2011

Microsoft Outlook 2007 Calendar Features

Connect to MySQL or Microsoft SQL Server using R

Exchange Account (Outlook) Mail Cleanup

kalmstrom.com Business Solutions

Creating and Managing Shared Folders

Outlook Express POP Instructions - Bloomsburg University Students

How To Use Optimum Control EDI Import. EDI Invoice Import. EDI Supplier Setup General Set up

Cleaning Up Your Outlook Mailbox and Keeping It That Way ;-) Mailbox Cleanup. Quicklinks >>

NetWrix File Server Change Reporter. Quick Start Guide

Transcription:

1 Using a SQL Filter in Outlook 2002/2003 Views Those of you who have used Outlook for a while may have discovered the power of Outlook Views and use these on every folder to group, sort and filter your outlook data depending on the task at hand. One of Outlook s (fairly well) hidden secrets is the SQL Tab on the Filter dialog in Outlook 2002 and 2003 (Note: this article does not apply if you re using Outlook 2000!). This article explores how the SQL Tab can be used to create advanced queries or filters when the need arises. We look at: Defining the Problem The Task at Hand Importing the Sample Data Identifying the Filter Conditions Defining the Query in Boolean Terms Creating and Modifying the View Note: If you are not familiar with the basics of creating Outlook Views, you might like to review the following article first: Profiling Contacts using the Outlook Forms Designer - 02 2 Defining the Problem The Task at Hand Suppose I have the following list of Contacts in my Personal Contacts folder that represent the customers and prospects I m currently dealing with. (For details on how to import this set of data, if you d like to try the exercises described, please refer to Importing the Sample Data) I want to get a listing of just those contacts that are marketing decision makers based on the West Coast (of the United States) say for the purposes of sending them a newsletter or direct mailing. In order to do this, I need to create a filtered view in Outlook. (A view is a sub-set of my data in a particular folder that is grouped, sorted, and filtered according to specified criteria). However, in certain cases (such ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 1

as the task for this exercise), the criteria for the filter conditions are such that they cannot be set up using the basic filter dialogs, and require they be entered via the SQL Tab. My first challenge is in Identifying the Filter Conditions that equate to these specific criteria. 3 Importing the Sample Data The exercises in this article are based on a small set of Outlook sample contacts. If you wish to actually test the principles discussed using this sample data, you may import the sample CSV file, a link to which is given below. There are only 14 contacts in this database so they can easily be deleted again once you are done. http://ds1.downloadtech.net/cn1018/downloads/documents/outlookwise/outlook_contacts.csv A CSV (Comma-Separated-Variable) file is a data file where the fields are separated by a comma. By default if you open a CSV file and you have Microsoft Excel installed, the file should open in Excel, as shown below: For details on importing this file, refer to the following document: OutlookWise Tutorial Importing Outlook Data Once you have imported the file, you should have the following contacts showing in your Contacts folder. Alternatively, you may want to create a new sub-folder below your Contacts folder and import these contacts into this sub-folder, so that this data does not interfere with your working contacts list. ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 2

4 Identifying the Filter Conditions The task defined for us is to get a listing of just those contacts who are marketing decision makers on the West Coast (of the United States). My first challenge is to identify the fields in my Outlook Contacts folder that equate to these individual criteria. So in this example how would I identify a marketing decision maker? This might be anybody that has the word Marketing in their Job Title, but is also a Manager, Director, Vice President, etc. I could single out each of these Job Titles individually, so as to include Marketing Manager, Marketing Director, Marketing Vice President, Vice President Marketing, etc. However, if I look at my data carefully I notice that I can just exclude Assistant in this particular case, as Marketing Assistants would not typically be decision makers. So my first condition would be: Job Title contains the word Marketing but Job Title does not contain the word Assistant. Notice we use the Contains operator so that we include those contacts with Marketing anywhere in the Job Title, such as Marketing Manager, Vice President - Marketing, etc. The next condition is contacts located on the West Coast (of the United States). So here I would use the State field to home in on the required contacts. So the conditions would be: State = WA State = OR State = CA However, joining these particular conditions together requires an elementary knowledge of what is known as Boolean Algebra (AND/OR and NOT Conditions). ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 3

5 Boolean Algebra (AND/OR and NOT Conditions) In order to really understand how to create complex queries, we need a basic knowledge of Boolean Algebra. But a word of advice to those of you who are not that mathematically oriented and who shudder at the thought of anything related to Algebra don t panic. Boolean Algebra is not that difficult to grasp and makes perfect sense once you ve got the basics. Boolean Algebra is simply a way of rephrasing a complicated logical statement into a series of simpler AND, OR and NOT conditions without changing its meaning. The rules of Boolean Algebra are straightforward, and can be applied to any logical expression. The notational system was developed by the English mathematician George Boole to permit an algebraic manipulation of logical statements. Today, all computers employ Boole's logic system - using microchips that contain thousands of tiny electronic switches arranged into logical gates that produce predictable and reliable conclusions. For the purposes of trying to understand the 3 Boolean operators, namely AND, OR and NOT, let s look at 2 simple sets of data, namely Blue Set (Dark Shading): Contacts whose Job Title = (is exactly) Marketing Manager Yellow Set (Light Shading): Contacts whose Country = (is exactly) United States of America Boolean AND When the AND operator is used to join the 2 sets, the results retrieved will contain both Blue and Yellow information. So in this case you would only get contacts that are Marketing Managers AND have United States of America as their country. This would be the Green set shown above. Boolean OR When the OR operator is used to join the 2 sets, the results retrieved will contain either Blue, or Yellow, or Blue and Yellow information together. So in this case you would get contacts that are Marketing Managers or have United States of America as their country, or both. This would be the entire set of Blue, Green and Yellow shown above. Boolean NOT ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 4

When 2 conditions are combined with a NOT operator, the results retrieved will contain only Blue exclusively. So in this case you would get contacts that are Marketing Managers but do not have United States of America as their country. This would be the Blue set above. 6 Defining the Query in Boolean Terms Now that we know the basics of Boolean Algebra, let s have another look at our more complex expression. If we want to test all contacts against the expression Marketing Decision Makers This equates to the following 2 conditions, namely: and: Job Title contains Marketing Job Title does not contain Assistant Because both conditions must be true for a contact person to be included in the list, they must be joined by the AND operator. However because the second condition is a negative we must use the AND NOT operator, as in: AND/OR Field Operator Value Job Title Contains Marketing AND NOT Job Title Contains Assistant Now let s look at the problem of the State field having several different values, namely: State = WA State = OR State = CA Because any one of these conditions must be true for a contact person to be included in the list, this is an OR Condition (Either State must equal WA OR State must equal OR OR State must equal CA for a contact to be listed). AND OR Field Operator Value State = WA OR State = OR ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 5

OR State = CA Now we look at the complete set of criteria for a record to be included in the listing of Marketing decision makers in the US. The condition is: Job Title contains Marketing AND NOT Job Title contains Assistant AND (State = WA OR State = OR OR State = CA ) Another important aspect of Boolean Algebra comes into play here, namely Nested Conditions. We can think of this condition as: (Marketing Decision Makers) AND (lives on the West Coast) So wherever you have multiple conditions that must be evaluated together before being combined with another set of data, you need to enclose these conditions in brackets. In this case, given the fact that any contact who is a marketing decision maker AND who is living on the West Coast (his or her State is either WA, OR, or CA) must be included in the list means that the 3 State OR conditions must be evaluated together first and then the result ANDed with the Job Title condition. So these 3 OR conditions must be nested inside brackets. You ve probably figured out by now that you cannot enter this filter using only the Advanced Tab of the Filter dialog that you are already familiar with. This is where the SQL Tab comes in. We re now ready to set about Creating and Modifying the View. 7 Creating and Modifying the View Now that I have identified the fields that equate to the criteria I have defined, I am ready to create a View called Marketing Decision Makers on the West Coast. We go through the following steps: Creating the View Setting the Fields for the View Defining the Filter for the View Modifying the Filter using the SQL Tab 7.1 Creating the View 1. Click View -> Arrange by -> Current View -> Define Views ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 6

2. The Current View Organizer screen will be displayed: 3. Click New to create a new View: ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 7

4. Enter the View Name Marketing Decision Makers on the West Coast. (Leave the Type of view as Table). Click OK. You will then get the Customize View dialog: 7.2 Setting the Fields for the View 1. In this example I m working with 2 fields that do not ordinarily appear in the default Views, namely Job Title and State. So it would be useful to see these fields in the View. To do this click on the Fields button at the top of the Customize View dialog: ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 8

2. The Show Fields dialog will be displayed: 3. From the Frequently-used fields select Job Title and State in turn and click Add-> to move the fields to the right hand window showing the fields that will appear in the View. 4. Use Move Up and Move Down to reposition these fields so that they will display where you d like them to: ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 9

5. Click OK to return to the Customize View dialog. 7.3 Defining the Filter for the View 1. Notice that on the Customize View screen the Filter is set to Off, meaning this View by default would show all Contacts in the list 2. Click on Filter, and go to the Advanced Tab: ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 10

3. Before using the SQL Tab it is often good to start with the Advanced Tab because this is easier to use in terms of defining our criteria. Most of the time we can just use the SQL Tab to modify the query already created using the Advanced Tab. 4. We now enter our first 2 conditions, namely Job Title contains Marketing, and Job Title doesn t contain Assistant (we will modify this later in the SQL Tab). We select Job Title either from Frequently-used fields or All Contact fields in the list dropped down by the Field button. Click Add to add the condition to the list. 5. We then do the same for our other conditions, namely State = WA and State = OR and State = CA. We select State again either from Frequently-used fields or All Contact fields in the list dropped down by the Field button. Click Add to add each condition to the list. ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 11

6. The last thing we need to do is now edit the query using the SQL Tab. 7.4 Modifying the Filter using the SQL Tab 1. If we click on the SQL Tab we should see the following: 2. The SQL tab might look a bit intimidating at first, because the fields have Exchange DASL complex schema names rather than the familiar Outlook field names. However, don t be too concerned; the SQL queries are relatively easy to modify. While you can create power filters if you know some SQL syntax, you don't need to know a lot about SQL to create filters not possible using the other filter tabs. ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 12

3. Note that Outlook has defaulted the second condition to an OR condition because this is the usual scenario in the case of fields that are the same. However in our case this will not work. Edit the criteria by clicking on Edit these criteria directly and change the expression to read: 4. We then click OK to return to the Customize View screen. Then click OK to return to the Custom View Organizer, and Apply View to save and activate the view: 8 Summary 5. All the Marketing Decision Makers that are located on the West Coast are displayed in the View mission accomplished. The SQL Tab is a powerful tool for the Outlook users who need to be able to derive listings of sub-sets of their Outlook data based on more complex queries than just simple AND/OR conditions. Most of the time one can create the query using the Advanced Tab as we always do and then modify the SQL query that has been created, rather than trying to write the SQL query from scratch. ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 13

9 MX-Contact: Managing Contact Lists inside Outlook/Exchange If you re looking for an application to assist you with managing a contact list of some kind, whether it be customers, prospects, members, suppliers or whatever, check out MX-Contact. MX-Contact is a CRM, Contact Management and Sales Automation package that runs inside Microsoft Outlook 2000, 2002 or 2003. The system utilises all the standard functionality of Outlook but provides many additional features that transform Outlook into a powerful Contact Management and CRM system. www.mxcontact.com MX-Contact comprises a Base System, with optional Sales, Marketing and Support modules that can be added at any time. So you can use MX- Contact just for managing the contacts and/or companies you deal with, and the interactions (phone calls, e-mails, appointments, etc.) you have with them, plus use it to manage your sales opportunities, events and/or customer support incidents, by adding any of the available modules. Download the free Personal Edition of MX-Contact. 10 Subscribe to the OutlookWise Newsletter If you ve found this article useful, please subscribe to the OutlookWise monthly newsletter. OutlookWise is both a web site and newsletter aimed at keeping Microsoft Outlook users up-to-date with news, information and articles of interest on Outlook and Exchange Server, as well as reviews of addon products and utilities, all geared to enhancing your knowledge of Outlook and increasing your productivity. If you would like to contribute an idea or article, or tell us about an exciting product or utility that complements Outlook and/or Exchange Server, please feel free to e-mail us. OutlookWise is a service to the Outlook community from ExchangeWise, which is a specialist software company focusing on the development and marketing of applications and utilities that enhance the functionality of Microsoft Outlook and Exchange Server. OutlookWise is edited by Brian Drury, founder of ExchangeWise, and the architect of MX-Contact, a CRM, Contact Management and Sales Automation System for Microsoft Outlook. Brian has over 20 years experience in the IT industry and has focused on CRM, Messaging and Collaboration systems for the last 14 years. Visit the: OutlookWise Home Page ExchangeWise Home Page MX-Contact Home Page ExchangeWise (Pty) Ltd www.exchangewise.com www.outlookwise.com Page 14