<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>LEARN HOW TO WRITE SQL QUERIES FOR GOLDMINE</title>
   
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
  
    <!-- Optional theme -->
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    
    <link rel="stylesheet" href="css/style.css">
     
     
    <!-- Latest compiled and minified JavaScript -->
    <script src="js/bootstrap.min.js"></script>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body style="margin:25px">
  <span style="font-size: 24px; color: #900;"><img src="1stdirecta.jpg" width="225" height="68" /></span>
  <table width="650" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><div class="page-header">
      <h4>LEARN HOW TO WRITE SQL QUERIES FOR GOLDMINE</h4>
    </div>
  <div class="panel-group" id="accordion">
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
          <h4 class="panel-title"> #1 Introduction </h4>
        </a> </div>
        <div id="collapseOne" class="panel-collapse collapse in">
          <div class="panel-body">
            <p style="line-height:1.5"> In this course, you will learn about the GoldMine Database table structure and how to write SQL Queries to view the information contained in your GoldMine Database. We will also look at the various uses for SQL Queries as they relate to GoldMine.</p>
            <p style="line-height:1.5">Sometimes when it comes to segmenting, analyzing or exporting data out of GoldMine, SQL Queries  work best or are the <u><strong>only option</strong></u>. SQL Queries can be written based on any information contained or not contained in the SQL Database. SQL Queries are one of the best tools for finding and getting data out of a database. Queries make your data more worthwhile, and help you to obtain greater value from your software. Learning to write and use SQL Queries will benefit you and your organization for years to come, not only in regards to GoldMine but any Database application that you may use that uses a SQL database to store and manage its information.</p>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
          <h4 class="panel-title"> #2 What is a Database?</h4>
        </a> </div>
        <div id="collapseTwo" class="panel-collapse collapse">
          <div class="panel-body">
            <P>Databases offer an organized way of storing, managing and retrieving large amounts of information. They do so through the use of database tables. If you’re familiar with spreadsheets like Microsoft Excel, you’re probably already accustomed to storing data in tabular form. </P>
            <p> It’s not much of a stretch to make the leap from spreadsheets to databases. GoldMine Premium Edition stores its information in a Microsoft SQL Server Database. The following is an image that shows some of the GoldMine Database Tables and their relationships to each other. Within each Database table are the different fields that the GoldMine information is stored in.</P>
            <p><img src="relationships.gif" class="img-responsive"></p>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
          <h4 class="panel-title"> #3     What is SQL?</h4>
        </a> </div>
        <div id="collapseThree" class="panel-collapse collapse">
          <div class="panel-body">
            <p> The Structured Query Language (SQL) is the set of instructions used to interact with a relational database. In fact, SQL is the only language that most databases actually understand. Whenever you interact with such a database, the software (in this case GoldMine) translates your commands (whether they are mouse clicks or form entries) into SQL statements that the Database knows how to interpret and execute. </p>
            <p><b> What Can SQL do?</b></p>
            <ul>
              <li>SQL can execute queries against a database</li>
              <li>SQL can retrieve data from a database</li>
              <li>SQL can insert records in a database</li>
              <li>SQL can update records in a database</li>
              <li>SQL can delete records from a database</li>
              <li>SQL can create new databases</li>
              <li>SQL can create new tables in a database</li>
              <li>SQL can create stored procedures in a database</li>
              <li>SQL can create views in a database</li>
              <li>SQL can set permissions on tables, procedures, and views</li>
            </ul>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseFour">
          <h4 class="panel-title"> #4      Intro to SQL Database Tables</h4>
        </a> </div>
        <div id="collapseFour" class="panel-collapse collapse">
          <div class="panel-body">
            <p>Just like Excel tables, Database tables consist of columns and rows. Each column contains a different type of attribute (Field) and each row corresponds to a single record. For example, imagine that we were building a database table called <strong>Contacts</strong> that contained names and telephone numbers. We’d probably set up Columns/Fields with names like “Firstname”, “Lastname” and “Phone” Then we’d simply start adding rows underneath those columns that contained the data for each contact in our Database. If we were building a table of contact information for our business that has 500 contacts, we’d end up with a table that contained 500 rows.</p>
            <p><img src="table.jpg" width="291" height="104" class="img-responsive"></p>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseFive">
          <h4 class="panel-title"> #5 Understanding SQL Table Relationships</h4>
        </a> </div>
        <div id="collapseFive" class="panel-collapse collapse">
          <div class="panel-body">
            <p> Databases use tables to organize information. Each table consists of a number of rows, each row corresponds to a single database record. So, how do databases keep all of these records and tables organized? It’s through the use of <strong>Keys</strong>, which helps build relationships between tables. Tables can have a <strong>1 to 1 Relationship</strong> or a <strong>1 to Many Relationship</strong>. This means that 1 record (row) in one table relates to exactly 1 record (row) in another table, or 1 record (row) in one table can be related to many records (rows) in another table. For example, in GoldMine, a Primary Contact (Contact1) can have many History items. (Conthist) this is a 1-to-Many relationship.</p>
            <h4><strong>Primary Keys</strong></h4>
            <p>The first type of key we’ll discuss is the Primary Key. Every database table has one column designated as the Primary Key. The value this Field/Column holds is unique for each record in the database. For example, assume we have a table called Employee that contains personnel information for every employee in our firm. We’d need to select an appropriate Primary Key that would uniquely identify each employee. Your first thought might be to use the employee’s name. This wouldn’t work out very well for large organizations because it’s conceivable that you’d hire two employees with the same name. A better choice might be to use a unique employeeID number that you assign to each employee when they’re hired. For most of the database tables in GoldMine CRM, GoldMine uses a field called ACCOUNTNO for its Primary field. The ACCOUNTNO field is automatically assigned a value when you create a new record in the database table. </p>
            <p><b>EMPLOYEE</b></p>
            <p><img src="Employee.jpg" width="380" height="101" class="img-responsive"></p>
            
            <p><strong>SQL PRIMARY KEY Constraint</strong></p>
            <ul>
              <li>The PRIMARY KEY constraint uniquely identifies each record in a database table.</li>
              <li>Primary keys must contain unique values.</li>
              <li>A primary key column cannot contain NULL values.</li>
              <li>Each table should have a primary key, and each table can have only ONE primary key.</li>
            </ul>
            
            <h4><strong>Foreign Keys</strong></h4>
            
            <p>The other type of key that we’ll discuss is the Foreign Key. A Foreign Key column in one table relates to a Primary Key column in another table.The purpose of the foreign key is to ensure referential integrity of the data. In other words, only values that are supposed to appear in the database are permitted.</p>
<p>
For example, say we have two tables, a CUSTOMER table that includes all customer data, and an ORDERS table that includes all customer orders. Business logic requires that all orders must be associated with a customer that is already in the CUSTOMER table. To enforce this logic, we place a foreign key on the ORDERS table and have it reference the primary key of the CUSTOMER table. This way, we can ensure that all orders in the ORDERS table are related to a customer in the CUSTOMER table. In other words, the ORDERS table cannot contain information on a customer that is not in the CUSTOMER table. </p>
            <p>
             NOTE: Some GoldMine tables use a RECID field as a Primary Key field and the ACCOUNTNO field is used as a FORIEGN KEY to relate to the ACCOUNTNO field of another table, we'll look at this closer later on. 
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseSix">
          <h4 class="panel-title"> #6
            Understanding  The GoldMine  Database Table Structure</h4>
        </a> </div>
        <div id="collapseSix" class="panel-collapse collapse">
          <div class="panel-body"> <a id="tablesmenu"></a>
          
          <p>For a complete list of the GoldMine database table structure please see the following:<br>
          <a href="http://www.mrenigma.co.uk/goldmine/tabledefs_85_9/index.php" target="_blank">GoldMine Table Structures</a></p>
          
            <h3>GoldMine Database Tables</h3>
            <P> <a href="#contact1">Contact1 - Primary Contacts</a></P>
            <P> <a href="#contact2">Contact2 - Custom Fields, secondary Primary Contact Information</a></P>
            <P> <a href="#cal">Cal - Scheduled Calendar Items/Pending Activities</a></P>
            <P> <a href="#conthist"> ContHist - History </a></P>
            <P> <a href="#contsupp">ContSupp - Details, Additional Contact, Email Addresses, Websites, Referrals, Linked Documents, Org Charts, Email Attachments, AP Events/Tracks</a></P>
           
            <a id="contact1"></a>
            <p style="line-height:1.5">      
            <h3>Contact1 - (Primary Contact Information)</h3>
            <p align="left">Table Description: <strong>Primary Contact table - holds the primary contact data </strong></p>
            <table width="100%" border="1" cellpadding="4" cellspacing="4" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Table Relationships</td>
              </tr>
              <tr>
                <td class="header">Field</td>
                <td class="header">Related Table to Field </td>
                <td align="center" class="header">Type </td>
                <td class="header">Notes</td>
              </tr>
              <tr>
                <td class="pn2">AccountNo</td>
                <td class="pn2">Contact2-&gt;AccountNo</td>
                <td align="center" class="pn2">1-1</td>
                <td class="pn2">Contact2 holds additional fields</td>
              </tr>
              <tr>
                <td class="pn2">AccountNo</td>
                <td class="pn2">ContSupp-&gt;AccountNo</td>
                <td align="center" class="pn2">1-M</td>
                <td class="pn2">&nbsp;</td>
              </tr>
              <tr>
                <td class="pn2">AccountNo</td>
                <td class="pn2">ContHist-&gt;AccountNo</td>
                <td align="center" class="pn2">1-M</td>
                <td class="pn2">&nbsp;</td>
              </tr>
              <tr>
                <td class="pn2">AccountNo</td>
                <td class="pn2">Cal-&gt;AccountNo</td>
                <td align="center" class="pn2">1-M</td>
                <td class="pn2">Only for activities linked to a contact record</td>
              </tr>
              <tr>
                <td class="pn2">AccountNo</td>
                <td class="pn2">MailBox-&gt;AccountNo</td>
                <td align="center" class="pn2">1-M</td>
                <td class="pn2">Linked e-mails, does not include folder records in Mailbox.</td>
              </tr>
            </table>
            <br />
            <table width="100%" border="1" cellpadding="4" cellspacing="4" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Table Fields Structure</td>
              </tr>
              <tr>
                <td width="85" class="header">Field Name </td>
                <td width="85" align="center" class="header">Field Type </td>
                <td width="60" align="center" class="header">Length </td>
                <td class="header">Description</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">ACCOUNTNO</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">20</td>
                <td class="pn">Unique Account Number. This field is automatically generated with the<br />
                  following values in the specified positions.<br />
                  <table width="90%" align="center" cellpadding="4" cellspacing="4" class="gmtables">
                    <tr>
                      <td align="center" nowrap="nowrap" class="subHead">Position</td>
                      <td class="subHead">Description</td>
                    </tr>
                    <tr>
                      <td align="center" class="gmtablerowrow">1-6</td>
                      <td class="gmtablerowrow">Date in YYMMDD format (Note 2000=A0, 2001=A1, 2010=B0)</td>
                    </tr>
                    <tr>
                      <td align="center" class="gmtablerowbottom">7-11</td>
                      <td class="gmtablerowbottom">Seconds since midnight</td>
                    </tr>
                    <tr>
                      <td align="center" class="gmtablerowbottom">12-17</td>
                      <td class="gmtablerowbottom">Randomly generated</td>
                    </tr>
                    <tr>
                      <td align="center" class="pn">18-20</td>
                      <td class="pn">First three characters of the contact or company name</td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td width="85" class="pn">COMPANY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">40</td>
                <td class="pn">Company Name</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTACT</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">40</td>
                <td class="pn">Contact Name</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTNAME</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">15</td>
                <td class="pn">Contact&rsquo;s Last Name</td>
              </tr>
              <tr>
                <td width="85" class="pn">DEPARTMENT</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">35</td>
                <td class="pn">Department</td>
              </tr>
              <tr>
                <td width="85" class="pn">TITLE</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">35</td>
                <td class="pn">Contact Title</td>
              </tr>
              <tr>
                <td width="85" class="pn">SECR</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Secretary</td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE1</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">25</td>
                <td class="pn">Phone 1</td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE2</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">25</td>
                <td class="pn">Phone 2 </td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE3</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">25</td>
                <td class="pn">Phone 3 </td>
              </tr>
              <tr>
                <td width="85" class="pn">FAX</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">25</td>
                <td class="pn">Fax</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT1</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">6</td>
                <td class="pn">Phone Extension 1</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT2</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">6</td>
                <td class="pn">Phone Extension 2 </td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">EXT3</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">6</td>
                <td class="pn">Fax Extension (used as EXT3 to maintain compatability with previous 
                  versions)</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT4</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">6</td>
                <td class="pn">Phone Extension 3 </td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS1</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">40</td>
                <td class="pn">Address 1</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS2</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">40</td>
                <td class="pn">Address 2 </td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS3</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">40</td>
                <td class="pn">Address 3 </td>
              </tr>
              <tr>
                <td width="85" class="pn">CITY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">30</td>
                <td class="pn">City</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATE</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">State</td>
              </tr>
              <tr>
                <td width="85" class="pn">ZIP</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">Zip Code (Post Code) </td>
              </tr>
              <tr>
                <td width="85" class="pn">COUNTRY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Country</td>
              </tr>
              <tr>
                <td width="85" class="pn">DEAR</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Salutation</td>
              </tr>
              <tr>
                <td width="85" class="pn">SOURCE</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Source (Lead)</td>
              </tr>
              <tr>
                <td width="85" class="pn">KEY1</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Key 1</td>
              </tr>
              <tr>
                <td width="85" class="pn">KEY2</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Key 2 </td>
              </tr>
              <tr>
                <td width="85" class="pn">KEY3</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Key 3 </td>
              </tr>
              <tr>
                <td width="85" class="pn">KEY4</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Key 4 </td>
              </tr>
              <tr>
                <td width="85" class="pn">KEY5</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Key 5 </td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">STATUS</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">3</td>
                <td class="pn">Internal Status. Composed of 3, 1-character flags.<br />
                  <table width="90%" align="center" cellpadding="0" cellspacing="0" class="gmtables">
                    <tr>
                      <td align="center" nowrap="nowrap" class="subHead">Position</td>
                      <td class="subHead">Description</td>
                    </tr>
                    <tr>
                      <td width="13%" align="center" nowrap="nowrap" class="gmtablerowrow"> 1</td>
                      <td width="87%" class="gmtablerowrow">This is the format of the phone numbers for the contact. If the first character is U, the phone numbers are formatted for USA-style phone numbers: (999)999-9999.</td>
                    </tr>
                    <tr>
                      <td align="center" nowrap="nowrap" class="gmtablerowbottom"> 2</td>
                      <td class="gmtablerowbottom">The curtain level. (0=none, 1=partial, 2=full)</td>
                    </tr>
                    <tr>
                      <td align="center" nowrap="nowrap" class="pn"> 3</td>
                      <td class="pn">A record alert is present if the value is 1.</td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="85" align="center" class="pn">Memo</td>
                <td width="60" align="center" class="pn">-</td>
                <td class="pn">Notes - Since 8.5 no longer used. Notes are now stored in a seperate Notes datbase table.</td>
              </tr>
              <tr>
                <td width="85" class="pn">MERGECODES</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Merge codes for primary contact</td>
              </tr>
              <tr>
                <td width="85" class="pn">CREATEBY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Creation user</td>
              </tr>
              <tr>
                <td width="85" class="pn">CREATEON</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Creation Date </td>
              </tr>
              <tr>
                <td width="85" class="pn">CREATEAT</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">5</td>
                <td class="pn">Creation Time </td>
              </tr>
              <tr>
                <td width="85" class="pn">OWNER</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Record Owner. If blank, owner is Public.</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Last modified By </td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTDATE</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Last modified Date </td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">6</td>
                <td class="pn">Last modified Time </td>
              </tr>
              <tr>
                <td width="85" class="pn">U_COMPANY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">40</td>
                <td class="pn">Upper-case shadow of Company Name </td>
              </tr>
              <tr>
                <td width="85" class="pn">U_CONTACT</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">40</td>
                <td class="pn">Upper-case shadow of Contact Name </td>
              </tr>
              <tr>
                <td width="85" class="pn">U_LASTNAME</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">15</td>
                <td class="pn">Upper-case shadow of Contact&rsquo;s Last Name</td>
              </tr>
              <tr>
                <td width="85" class="pn">U_CITY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">26</td>
                <td class="pn">Upper-case shadow of City</td>
              </tr>
              <tr>
                <td width="85" class="pn">U_STATE</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Upper-case shadow of State</td>
              </tr>
              <tr>
                <td width="85" class="pn">U_COUNTRY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Upper-case shadow of Country</td>
              </tr>
              <tr>
                <td width="85" class="pn">U_KEY1</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Upper-case shadow of Key 1</td>
              </tr>
              <tr>
                <td width="85" class="pn">U_KEY2</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Upper-case shadow of Key 2</td>
              </tr>
              <tr>
                <td width="85" class="pn">U_KEY3</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Upper-case shadow of Key 3</td>
              </tr>
              <tr>
                <td width="85" class="pn">U_KEY4</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Upper-case shadow of Key 4</td>
              </tr>
              <tr>
                <td width="85" class="pn">U_KEY5</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Upper-case shadow of Key 5</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">15</td>
                <td class="pn">Record ID </td>
              </tr>
            </table>
            <a href="#tablesmenu">Back To GoldMine Tables Menu</a> <a id="contact2"></a>
            <h3>CONTACT2 </h3>
            <p align="left"> <span class="tablessubheader">Table Description:</span> <strong>Contact file</strong>&mdash;contains the additional fields of contact records. Each complete contact 
              record has a record in this file. User-defined field data is stored in this file.</p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Table Relationships</td>
              </tr>
              <tr>
                <td width="79" class="header">Field</td>
                <td width="198" class="header">Related Table to Field </td>
                <td width="85" align="center" class="header">Type </td>
                <td width="365" class="header">Notes</td>
              </tr>
              <tr>
                <td width="79" class="pn2">AccountNo</td>
                <td class="pn2">Contact1-&gt;AccountNo</td>
                <td align="center" class="pn2">1-1</td>
                <td class="pn2">&nbsp;</td>
              </tr>
            </table>
            <br />
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Table Fields Structure</td>
              </tr>
              <tr>
                <td width="85" nowrap="nowrap" class="header">Field Name </td>
                <td width="85" align="center" nowrap="nowrap" class="header">Field Type </td>
                <td width="60" align="center" nowrap="nowrap" class="header">Length </td>
                <td nowrap="nowrap" class="header">Description</td>
              </tr>
              <tr>
                <td width="85" class="pn">ACCOUNTNO</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Account No - See Contact1 </td>
              </tr>
              <tr>
                <td width="85" class="pn">CALLBACKON</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Call Back Date</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">CALLBACKAT</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">8</td>
                <td class="pn">Call Back Time (unused compatability field) <br />
                  <strong>(Format: h:mmam/pm. 
                    Left padded with space if less than 10. </strong></td>
              </tr>
              <tr>
                <td width="85" class="pn">CALLBKFREQ</td>
                <td width="85" align="center" class="pn">Integer</td>
                <td width="60" align="center" class="pn">3</td>
                <td class="pn">Call Back Frequency</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTCONTON</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Last Contact Date</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">LASTCONTAT</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">8</td>
                <td class="pn">Last Contact Time <br />
                  <strong>Format: h:mmam/pm. Left padded with space if 
                    less than 10. </strong></td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTATMPON</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Last Attempt Date</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">LASTATMPAT</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">8</td>
                <td class="pn">Last Attempt Time <br />
                  <strong>Format: h:mmam/pm. Left padded with space if 
                    less than 10. </strong></td>
              </tr>
              <tr>
                <td width="85" class="pn">MEETDATEON</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Meeting Date</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">MEETTIMEAT</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">8</td>
                <td class="pn">Meeting Time<br />
                  <strong> Format: h:mmam/pm. Left padded with space if less 
                    than 10. </strong></td>
              </tr>
              <tr>
                <td width="85" class="pn">COMMENTS</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">65</td>
                <td class="pn">Comments</td>
              </tr>
              <tr>
                <td width="85" class="pn">PREVRESULT</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">65</td>
                <td class="pn">Previous Results</td>
              </tr>
              <tr>
                <td width="85" class="pn">NEXTACTION</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">65</td>
                <td class="pn">Next Action</td>
              </tr>
              <tr>
                <td width="85" class="pn">ACTIONON</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Next Action Date</td>
              </tr>
              <tr>
                <td width="85" class="pn">CLOSEDATE</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Next forecasted sale expected close date</td>
              </tr>
              <tr>
                <td width="85" class="pn">USERDEF01</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">User Defined 1</td>
              </tr>
              <tr>
                <td width="85" class="pn">USERDEF02</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">User Defined 2 </td>
              </tr>
              <tr>
                <td width="85" class="pn">USERDEF03</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">User Defined 3 </td>
              </tr>
              <tr>
                <td width="85" class="pn">USERDEF04</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">User Defined 4 </td>
              </tr>
              <tr>
                <td width="85" class="pn">USERDEF05</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">User Defined 5 </td>
              </tr>
              <tr>
                <td width="85" class="pn">USERDEF06</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">User Defined 6 </td>
              </tr>
              <tr>
                <td width="85" class="pn">USERDEF07</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">User Defined 7 </td>
              </tr>
              <tr>
                <td width="85" class="pn">USERDEF08</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">User Defined 8 </td>
              </tr>
              <tr>
                <td width="85" class="pn">USERDEF09</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">User Defined 9 </td>
              </tr>
              <tr>
                <td width="85" class="pn">USERDEF10</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">User Defined 10 </td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">15</td>
                <td class="pn">Record ID </td>
              </tr>
            </table>
            <a href="#tablesmenu">Back To GoldMine Tables</a> <a id="cal"></a>
            <h3>CAL</h3>
            <p align="left"> <span class="tablessubheader">Table Description:</span><strong> Calendar file</strong>&mdash; contains a record for each scheduled activity. The different record types are distinguished by the contents of the RECTYPE field. Different RECTYPEs may use each field for a different purpose.</p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Table Relationships</td>
              </tr>
              <tr>
                <td width="85" nowrap="nowrap" class="header">Field</td>
                <td nowrap="nowrap" class="header">Related Table to Field </td>
                <td width="60" align="center" nowrap="nowrap" class="header">Type </td>
                <td nowrap="nowrap" class="header">Notes</td>
              </tr>
              <tr>
                <td nowrap="nowrap" class="pn2">AccountNo</td>
                <td nowrap="nowrap" class="pn2">Contact1-&gt;AccountNo</td>
                <td align="center" nowrap="nowrap" class="pn2">M-1</td>
                <td nowrap="nowrap" class="pn2">Only for activities linked to a contact record</td>
              </tr>
              <tr>
                <td nowrap="nowrap" class="pn2">RecID</td>
                <td nowrap="nowrap" class="pn2">MailBox-&gt;LinkRecID</td>
                <td align="center" nowrap="nowrap" class="pn2">1-1</td>
                <td nowrap="nowrap" class="pn2">&nbsp;</td>
              </tr>
              <tr>
                <td nowrap="nowrap" class="pn2">LinkRecID</td>
                <td nowrap="nowrap" class="pn2">MailBox-&gt;RecID</td>
                <td align="center" nowrap="nowrap" class="pn2">1-1</td>
                <td nowrap="nowrap" class="pn2">&nbsp;</td>
              </tr>
              <tr>
                <td nowrap="nowrap" class="pn2">LopRecID</td>
                <td nowrap="nowrap" class="pn2">OpMgr-&gt;RecID</td>
                <td align="center" nowrap="nowrap" class="pn2">M-1</td>
                <td nowrap="nowrap" class="pn2">Records related to opportunities/projects</td>
              </tr>
            </table>
            <br />
            <table width="100%" border="1" cellpadding="1" cellspacing="1" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Table Fields Structure</td>
              </tr>
              <tr>
                <td width="85" nowrap="nowrap" class="header">Field Name </td>
                <td width="85" align="center" nowrap="nowrap" class="header"> Field Type </td>
                <td width="60" align="center" nowrap="nowrap" class="header">Length </td>
                <td nowrap="nowrap" class="header">Description</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">USERID</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">8</td>
                <td class="pn">User Name or resource</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">ACCOUNTNO</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">20</td>
                <td class="pn">Account Number of linked contact. If blank, record is un-linked (typical 
                  of to-dos). If formatted as &lsquo;PB:&rsquo;Username then pegboard information. If '--' and the record is an Email then the email was linked but then subsequently unlinked</td>
              </tr>
              <tr>
                <td width="85" class="pn">ONDATE</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Activity Date</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">ONTIME</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">5</td>
                <td class="pn">Activity Time</td>
              </tr>
              <tr>
                <td width="85" class="pn">ENDDATE</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Ending date of scheduled activity</td>
              </tr>
              <tr>
                <td width="85" class="pn">ALARMFLAG</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">1</td>
                <td class="pn">Alarm Flag (Y/N)</td>
              </tr>
              <tr>
                <td width="85" class="pn">ALARMTIME</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">5</td>
                <td class="pn">Alarm Time</td>
              </tr>
              <tr>
                <td width="85" class="pn">ALARMDATE</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Alarm Date</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">ACTVCODE</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">3</td>
                <td class="pn">Activity Code</td>
              </tr>
              <tr>
                <td width="85" class="pn">RSVP</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">1</td>
                <td class="pn">RSVP Notification (Y/N)</td>
              </tr>
              <tr>
                <td width="85" class="pn">DURATION</td>
                <td width="85" align="center" class="pn">Integer</td>
                <td width="60" align="center" class="pn">3</td>
                <td class="pn">Duration (time in total minutes)/Forecasted sale probability</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">RECTYPE</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">1</td>
                <td class="pn">Record Type. Possible values are listed below.<br />
                  <table width="90%" align="center" cellpadding="0" cellspacing="0" class="gmtables">
                    <tr>
                      <td align="center" nowrap="nowrap" class="subHead">Value</td>
                      <td class="subHead">Description</td>
                    </tr>
                    <tr>
                      <td width="15%" align="center" nowrap="nowrap" class="gmtablerowtop">A</td>
                      <td width="85%" class="gmtablerowtop">Appointment</td>
                    </tr>
                    <tr>
                      <td align="center" nowrap="nowrap" class="gmtablerowrow">C</td>
                      <td class="gmtablerowrow">Call Back</td>
                    </tr>
                    <tr>
                      <td align="center" nowrap="nowrap" class="pn">D</td>
                      <td class="pn">To-do</td>
                    </tr>
                    <tr>
                      <td align="center" nowrap="nowrap" class="gmtablerowrow">E</td>
                      <td class="gmtablerowrow">Event</td>
                    </tr>
                    <tr>
                      <td align="center" nowrap="nowrap" class="pn">M</td>
                      <td class="pn">Message</td>
                    </tr>
                    <tr>
                      <td align="center" nowrap="nowrap" class="gmtablerowrow">O</td>
                      <td class="gmtablerowrow">Other</td>
                    </tr>
                    <tr>
                      <td align="center" nowrap="nowrap" class="pn">Q</td>
                      <td class="pn">Queued e-mail</td>
                    </tr>
                    <tr>
                      <td align="center" nowrap="nowrap" class="gmtablerowrow">S</td>
                      <td class="gmtablerowrow">Sales potential</td>
                    </tr>
                    <tr>
                      <td align="center" nowrap="nowrap" class="pn">T</td>
                      <td class="pn">Next action</td>
                    </tr>
                    <tr>
                      <td align="center" nowrap="nowrap" class="gmtablerowtop">{Blank}</td>
                      <td class="gmtablerowtop">Peg Board record</td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td width="85" class="pn">ACONFIRM</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">3</td>
                <td class="pn">Meeting Confirmation</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">APPTUSER</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">10</td>
                <td class="pn">Meeting Confirmation User (Character 10 indicates color &ndash; options 
                  listed below)<br />
                  <table width="90%" align="center" cellpadding="0" cellspacing="0" class="gmtables">
                    <tr>
                      <td align="center" nowrap="nowrap" class="subHead">Value</td>
                      <td class="subHead">Description</td>
                    </tr>
                    <tr class="gmtables">
                      <td width="17%" align="center" nowrap="nowrap" class="gmtablerowrow">(Space)</td>
                      <td width="83%" class="gmtablerowrow">Blue (Default) </td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="pn">!</td>
                      <td class="pn">Magenta</td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="gmtablerowrow">&quot;</td>
                      <td class="gmtablerowrow">Red</td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="pn">#</td>
                      <td class="pn">Cyan</td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="gmtablerowrow">$</td>
                      <td class="gmtablerowrow">Green</td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="pn">%</td>
                      <td class="pn">Yellow</td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="gmtablerowrow">&amp;</td>
                      <td class="gmtablerowrow">Dark Cyan </td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="pn">&lsquo; (Apostrophe) </td>
                      <td class="pn">White</td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="gmtablerowrow">(</td>
                      <td class="gmtablerowrow">Light Grey </td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="pn">)</td>
                      <td class="pn">Maroon</td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="gmtablerowrow">*</td>
                      <td class="gmtablerowrow">Dark Green </td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="pn">+</td>
                      <td class="pn">Dark Yellow </td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="gmtablerowrow">,</td>
                      <td class="gmtablerowrow">Dark Blue </td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="pn">-</td>
                      <td class="pn">Purple</td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="gmtablerowrow">.</td>
                      <td class="gmtablerowrow">Dark Grey </td>
                    </tr>
                    <tr class="gmtables">
                      <td align="center" nowrap="nowrap" class="pn">/</td>
                      <td class="pn">Black</td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td width="85" class="pn">STATUS</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">4</td>
                <td class="pn">First character is flag, second char =1 if notes exist</td>
              </tr>
              <tr>
                <td width="85" class="pn">DIRCODE</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">DirCode of the current contact file</td>
              </tr>
              <tr>
                <td width="85" class="pn">NUMBER1</td>
                <td width="85" align="center" class="pn">Integer</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Sales Potential. Also used to mark private records, if value is &lsquo;16&rsquo;.</td>
              </tr>
              <tr>
                <td width="85" class="pn">NUMBER2</td>
                <td width="85" align="center" class="pn">Integer</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Units of a Forecasted Sale</td>
              </tr>
              <tr>
                <td width="85" class="pn">COMPANY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">60</td>
                <td class="pn">Company/Contact Name (also used for pegboard times)</td>
              </tr>
              <tr>
                <td width="85" class="pn">REF</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">80</td>
                <td class="pn">Reference</td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="85" align="center" class="pn">Image</td>
                <td width="60" align="center" class="pn">-</td>
                <td class="pn">Notes</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKRECID</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">15</td>
                <td class="pn">Linked Record ID</td>
              </tr>
              <tr>
                <td width="85" class="pn">LDOCRECID</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">15</td>
                <td class="pn">Reserved for future use</td>
              </tr>
              <tr>
                <td width="85" class="pn">LOPRECID</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">15</td>
                <td class="pn">Linked Opportunity Manager Record ID</td>
              </tr>
              <tr>
                <td width="85" class="pn">CREATEBY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Created by User</td>
              </tr>
              <tr>
                <td width="85" class="pn">CREATEON</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Creation Date</td>
              </tr>
              <tr>
                <td width="85" class="pn">CREATEAT</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">6</td>
                <td class="pn">Creation Time</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Last Modified By</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTDATE</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Last Modified Date</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">5</td>
                <td class="pn">Last Modified Time</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">15</td>
                <td class="pn">Record ID </td>
              </tr>
            </table>
            <a href="#tablesmenu">Back To GoldMine Tables</a> <a id="conthist"></a>
            <h3>ContHist -  (Completed Activities - History Tab) </h3>
            <p align="left"><br>
              <span class="tablessubheader">Table Description:</span> <strong>Contact history file</strong>&mdash;contains a record for each completed activity<br>
            </p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Table Relationships</td>
              </tr>
              <tr>
                <td width="85" class="header">Field</td>
                <td width="170" class="header">Related Table to Field </td>
                <td width="85" align="center" class="header">Type </td>
                <td width="335" class="header">Notes</td>
              </tr>
              <tr>
                <td class="pn2">AccountNo</td>
                <td class="pn2">Contact1-&gt;AccountNo</td>
                <td align="center" class="pn2">M-1</td>
                <td class="pn2">&nbsp;</td>
              </tr>
              <tr>
                <td class="pn2">LopRecID</td>
                <td class="pn2">OpMgr-&gt;RecID</td>
                <td align="center" class="pn2">M-1</td>
                <td class="pn2">Records related to opportunities/projects</td>
              </tr>
              <tr>
                <td class="pn2">RecID</td>
                <td class="pn2">MailBox-&gt;LinkRecID</td>
                <td align="center" class="pn2">1-1</td>
                <td class="pn2">&nbsp;</td>
              </tr>
              <tr>
                <td class="pn2">LinkRecID</td>
                <td class="pn2">MailBox-&gt;RecID</td>
                <td align="center" class="pn2">1-1</td>
                <td class="pn2">&nbsp;</td>
              </tr>
            </table>
            <br>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Table Fields Structure</td>
              </tr>
              <tr>
                <td width="85" nowrap class="header">Field Name </td>
                <td width="85" align="center" nowrap class="header"> Field Type </td>
                <td width="60" align="center" nowrap class="header">Length </td>
                <td nowrap class="header">Description</td>
              </tr>
              <tr>
                <td width="85" class="pn">USERID</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">User</td>
              </tr>
              <tr>
                <td width="85" class="pn">ACCOUNTNO</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Account Number. If '--' and the record is an Email then the email was linked but then subsequently unlinked</td>
              </tr>
              <tr>
                <td width="85" class="pn">SRECTYPE</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">1</td>
                <td class="pn">First character of RecType</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">RECTYPE</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">10</td>
                <td class="pn">Record Type. Contains up to 5 characters. The following are definitions for each segment of this field. <span class="subHead">See Table Below </span></td>
              </tr>
              <tr>
                <td width="85" class="pn">ONDATE</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Action Date</td>
              </tr>
              <tr>
                <td width="85" class="pn">ONTIME</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">5</td>
                <td class="pn">Action Time</td>
              </tr>
              <tr>
                <td width="85" class="pn">ACTVCODE</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">3</td>
                <td class="pn">Activity Code</td>
              </tr>
              <tr>
                <td width="85" class="pn">RESULTCODE</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">3</td>
                <td class="pn">Result Code</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATUS</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">2</td>
                <td class="pn">First character is flag, second char =1 if notes exist</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">DURATION</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">8</td>
                <td class="pn">Duration of activity. Formatted as hh:mm:ss. If none, either blank or &lsquo;0&rsquo;. Also used for forecasted sale value.</td>
              </tr>
              <tr>
                <td width="85" class="pn">UNITS</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Units of a Forecasted Sale</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">REF</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">65</td>
                <td class="pn">Reference. Contact name is stored at end in parenthesis, preceeded by &lsquo;oc:&rsquo;. <br>
                  <strong>Example: &lsquo;This is the reference (oc: Bob Smith)&rsquo;.</strong></td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="85" align="center" class="pn">Image</td>
                <td width="60" align="center" class="pn">-</td>
                <td class="pn">Notes</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKRECID</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">15</td>
                <td class="pn">E-Mail Linked Record ID</td>
              </tr>
              <tr>
                <td width="85" class="pn">LOPRECID</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Linked Opportunity. Manager. Record</td>
              </tr>
              <tr>
                <td width="85" class="pn">CREATEBY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Creation User</td>
              </tr>
              <tr>
                <td width="85" class="pn">CREATEON</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Creation Date</td>
              </tr>
              <tr>
                <td width="85" class="pn">CREATEAT</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">6</td>
                <td class="pn">Creation Time</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Last Modified By</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTDATE</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Last Modified Date</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">6</td>
                <td class="pn">Last Modified Time</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">15</td>
                <td class="pn">Record ID </td>
              </tr>
            </table>
            <br>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" nowrap class="mainheader">RecType Field Definitions</td>
              </tr>
              <tr>
                <td colspan="2" nowrap><strong> Characters 1-2 (Record Type) </strong></td>
                <td colspan="2" nowrap><strong>Character 4 (Private, RSVP Flags)</strong></td>
              </tr>
              <tr>
                <td width="14%" align="center" nowrap class="header">Character</td>
                <td width="33%" nowrap class="header">Description</td>
                <td align="center" nowrap class="header">Character</td>
                <td nowrap class="header">Description</td>
              </tr>
              <tr>
                <td align="center" class="pn">A</td>
                <td class="pn">Appointment</td>
                <td align="center" class="pn">(Space)</td>
                <td class="pn">Non-Private, Non-RSVP</td>
              </tr>
              <tr>
                <td align="center" class="pn">C</td>
                <td class="pn">Phone call</td>
                <td align="center" class="pn">P</td>
                <td class="pn">Private</td>
              </tr>
              <tr>
                <td align="center" class="pn">CC</td>
                <td class="pn">Call Back </td>
                <td align="center" class="pn">R</td>
                <td class="pn">RSVP</td>
              </tr>
              <tr>
                <td align="center" class="pn">CI</td>
                <td class="pn">Incomming Call </td>
                <td align="center" class="pn">B</td>
                <td class="pn">Private and RSVP </td>
              </tr>
              <tr>
                <td align="center" class="pn">CM</td>
                <td class="pn">Returned Message </td>
                <td colspan="2" nowrap><strong>Character 5 (Colour of Original Activity)</strong></td>
              </tr>
              <tr>
                <td align="center" class="pn">CO</td>
                <td class="pn">Outgoing Call </td>
                <td width="14%" align="center" nowrap class="header">Character</td>
                <td width="39%" nowrap class="header">Description</td>
              </tr>
              <tr>
                <td align="center" class="pn">D</td>
                <td class="pn">To-Do</td>
                <td align="center" class="pn">(Space)</td>
                <td class="pn">Blue (Default) </td>
              </tr>
              <tr>
                <td align="center" class="pn">E</td>
                <td class="pn">Event</td>
                <td align="center" class="pn">!</td>
                <td class="pn">Magenta</td>
              </tr>
              <tr>
                <td align="center" class="pn">F</td>
                <td class="pn">Literature</td>
                <td align="center" class="pn">&quot;</td>
                <td class="pn">Red</td>
              </tr>
              <tr>
                <td align="center" class="pn">L</td>
                <td class="pn">Form</td>
                <td align="center" class="pn">#</td>
                <td class="pn">Cyan</td>
              </tr>
              <tr>
                <td align="center" class="pn">M</td>
                <td class="pn">Sent Message </td>
                <td align="center" class="pn">$</td>
                <td class="pn">Green</td>
              </tr>
              <tr>
                <td align="center" class="pn">MG</td>
                <td class="pn">E-Mail Message </td>
                <td align="center" class="pn">%</td>
                <td class="pn">Yellow</td>
              </tr>
              <tr>
                <td align="center" class="pn">MI</td>
                <td class="pn">Received E-mail </td>
                <td align="center" class="pn">&amp;</td>
                <td class="pn">Dark Cyan </td>
              </tr>
              <tr>
                <td align="center" class="pn">MO</td>
                <td class="pn">Sent E-Mail </td>
                <td align="center" class="pn">&lsquo; (Apostrophe) </td>
                <td class="pn">White</td>
              </tr>
              <tr>
                <td align="center" class="pn">O</td>
                <td class="pn">Other</td>
                <td align="center" class="pn">(</td>
                <td class="pn">Light Grey </td>
              </tr>
              <tr>
                <td align="center" class="pn">S</td>
                <td class="pn">Sale</td>
                <td align="center" class="pn">)</td>
                <td class="pn">Maroon</td>
              </tr>
              <tr>
                <td align="center" class="pn">T</td>
                <td class="pn">Next Action </td>
                <td align="center" class="pn">*</td>
                <td class="pn">Dark Green </td>
              </tr>
              <tr>
                <td align="center" class="pn">U</td>
                <td class="pn">Unknown</td>
                <td align="center" class="pn">+</td>
                <td class="pn">Dark Yellow </td>
              </tr>
              <tr>
                <td colspan="2" nowrap><strong> Character 3 (Result of the Activity)</strong></td>
                <td align="center" class="pn">,</td>
                <td class="pn">Dark Blue </td>
              </tr>
              <tr>
                <td align="center" nowrap class="header">Character</td>
                <td nowrap class="header">Description</td>
                <td align="center" class="pn">-</td>
                <td class="pn">Purple</td>
              </tr>
              <tr>
                <td align="center" class="pn">(Space)</td>
                <td class="pn">Successful</td>
                <td align="center" class="pn">.</td>
                <td class="pn">Dark Grey </td>
              </tr>
              <tr>
                <td align="center" class="pn">U</td>
                <td class="pn">Unsuccessful</td>
                <td align="center" class="pn">/</td>
                <td class="pn">Black</td>
              </tr>
            </table>
            <p><a href="#tablesmenu">Back To GoldMine Tables Menu</a></p>
            <a id="contsupp"></a>
            <h3>ContSupp -  (Additional Contacts, Alerts, Email Addresses, Web Sites, Details, Referrals, Linked Docs, Org Charts, AP Events/Tracks) </h3>
            <span class="mainheader">Table Description:</span> <strong>Supplementary contact set</strong>&mdash;contains a record for each Additional Contacts, Alerts, Email Addresses, Web Sites, Details, Referrals, Linked Docs, Org Charts, and AP Events/Tracks. The different record types are distinguished by the contents of the RecType field.  Different RecTypes may use each field for a different purpose. <br>
            <p></p>
            <table border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td align="center" nowrap class="header">RecType Field Value</td>
                <td class="header">ContSupp Record Description</td>
              </tr>
              <tr>
                <td align="center" class="gmtablerowrow"><a href="#contsupp_a">A</a></td>
                <td class="gmtablerowrow"><a href="#contsupp_a">Assigned Alert</a></td>
              </tr>
              <tr>
                <td align="center" class="pn1"><a href="#contsupp_c">C</a></td>
                <td class="pn1"><a href="#contsupp_c">Additional contact record</a></td>
              </tr>
              <tr>
                <td align="center" class="gmtablerowrow"><a href="#contsupp_e">E</a></td>
                <td class="gmtablerowrow"><a href="#contsupp_e">Automated Process attached event</a></td>
              </tr>
              <tr>
                <td align="center" class="pn1"><a href="#contsupp_h">H</a></td>
                <td class="pn1"><a href="#contsupp_h">Extended profile header</a></td>
              </tr>
              <tr>
                <td align="center" class="gmtablerowrow"><a href="#contsupp_l">L</a></td>
                <td class="gmtablerowrow"><a href="#contsupp_l">Linked document</a></td>
              </tr>
              <tr>
                <td align="center" class="pn1"><a href="#contsupp_o">O</a></td>
                <td class="pn1"><a href="#contsupp_o">Organizational chart</a></td>
              </tr>
              <tr>
                <td align="center" class="gmtablerowrow"><a href="#contsupp_p">P</a></td>
                <td class="gmtablerowrow"><a href="#contsupp_p">Profile record/extended profile record</a></td>
              </tr>
              <tr>
                <td align="center" class="gmtablerowrow"><a href="#contsupp_e">P</a></td>
                <td class="gmtablerowrow"><a href="#contsupp_e1">Email Addresses</a></td>
              </tr>
              <tr>
                <td align="center" class="pn1"><a href="#contsupp_r">R</a></td>
                <td class="pn1"><a href="#contsupp_r">Referral record</a></td>
              </tr>
            </table>
            <br>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Table Relationships</td>
              </tr>
              <tr>
                <td width="105" nowrap class="header">Field</td>
                <td width="198" nowrap class="header">Related Table to Field </td>
                <td width="85" align="center" nowrap class="header">Type </td>
                <td width="324" nowrap class="header">Notes</td>
              </tr>
              <tr>
                <td class="pn2">AccountNo</td>
                <td class="pn2">Contact1-&gt;AccountNo</td>
                <td align="center" class="pn2">M-1</td>
                <td class="pn2">&nbsp;</td>
              </tr>
            </table>
            <a id="contsupp_c"></a>
            <h3>CONTSUPP - Additional Contact Records</h3>
            <p>RecType in Table: C</p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Table Fields Structure </td>
              </tr>
              <tr>
                <td width="85" nowrap class="header">Field Name </td>
                <td width="85" align="center" nowrap class="header">Field Type </td>
                <td width="60" align="center" nowrap class="header">Length </td>
                <td nowrap class="header">Description</td>
              </tr>
              <tr>
                <td width="85" class="pn">ACCOUNTNO</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Account Number</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">RECTYPE</td>
                <td width="85" align="center" valign="top" class="pn">String</td>
                <td width="60" align="center" valign="top" class="pn">1</td>
                <td class="pn">C</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTACT</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">30</td>
                <td class="pn">Contact Name - Since GoldMine 8.5x the Length has been changed to 40</td>
              </tr>
              <tr>
                <td width="85" class="pn">TITLE</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">35</td>
                <td class="pn">Contact Title</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTSUPREF</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">35</td>
                <td class="pn">Reference</td>
              </tr>
              <tr>
                <td width="85" class="pn">DEAR</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Dear (Salutation)</td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Phone</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">6</td>
                <td class="pn">Phone Extension</td>
              </tr>
              <tr>
                <td width="85" class="pn">FAX</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Fax number</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKACCT</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Linked Account</td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="85" align="center" class="pn">Memo</td>
                <td width="60" align="center" class="pn">-</td>
                <td class="pn">Notes</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS1</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">40</td>
                <td class="pn">Additional Contact Address 1 </td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS2</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">40</td>
                <td class="pn">Additional Contact Address 2 </td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS3</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">40</td>
                <td class="pn">Additional Contact Address 3 </td>
              </tr>
              <tr>
                <td width="85" class="pn">CITY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">30</td>
                <td class="pn">Additional Contact City </td>
              </tr>
              <tr>
                <td width="85" class="pn">STATE</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Additional Contact State </td>
              </tr>
              <tr>
                <td width="85" class="pn">ZIP</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">Additional Contact Zip (Post Code) </td>
              </tr>
              <tr>
                <td width="85" class="pn">COUNTRY</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Additional Contact Country </td>
              </tr>
              <tr>
                <td width="85" class="pn">MERGECODES</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">20</td>
                <td class="pn">Merge Codes</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATUS</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">4</td>
                <td class="pn">First character is flag, second char =1 if notes exist</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKEDDOC</td>
                <td width="85" align="center" class="pn">Memo</td>
                <td width="60" align="center" class="pn">10</td>
                <td class="pn">Linked Document</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Last Modified By</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTEDATE</td>
                <td width="85" align="center" class="pn">Date</td>
                <td width="60" align="center" class="pn">8</td>
                <td class="pn">Last Modified Date</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">5</td>
                <td class="pn">Last Modified Time</td>
              </tr>
              <tr>
                <td width="85" class="pn">U_CONTACT</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">30</td>
                <td class="pn">Upper-case shadow of Contact Name (SQL Only)</td>
              </tr>
              <tr>
                <td width="85" class="pn">U_CONTSUPREF</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">35</td>
                <td class="pn">Upper-case shadow of Reference (SQL Only)</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="85" align="center" class="pn">String</td>
                <td width="60" align="center" class="pn">15</td>
                <td class="pn">Record ID </td>
              </tr>
            </table>
            <p><a href="#tablesmenu">Back To GoldMine Tables Menu</a></p>
            <a id="contsupp_a"></a>
            <h3>CONTSUPP - Alerts</h3>
            <p>RecType in Table: A </p>
            <p> Each assigned alert generates a detail record in the ContSupp table. The Alert information is stored in the Notes field. </p>
            <p align="left"><strong>Definitions/Descriptions:</strong><br>
              <strong>GoldMine Field:</strong> Field name when viewed in GoldMine. If blank, not visible in GoldMine. <br>
              <strong>Type: User/System:</strong> Defines whether the User or the System sets and maintains this value.<br>
              <strong>Field Used For:</strong> The type of data stored in this field. If a value in single quotes (' '), this is the actual value stored in this field.<br>
            </p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Fields In Use in GoldMine</td>
              </tr>
              <tr>
                <td width="85" nowrap class="header">Field Name </td>
                <td width="110" align="center" nowrap class="header">GoldMine Field </td>
                <td width="85" align="center" nowrap class="header">Type</td>
                <td nowrap class="header">Field Used For </td>
              </tr>
              <tr>
                <td width="85" class="pn">ACCOUNTNO</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">AccountNo of Linked Company</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECTYPE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">A</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTACT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">TITLE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTSUPREF</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">DEAR</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">FAX</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">LINKACCT</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">User/System</td>
                <td class="pn">See Below </td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS1</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS2</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS3</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">CITY</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">STATE</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ZIP</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">COUNTRY</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">MERGECODES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATUS</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKEDDOC</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTEDATE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Record ID</td>
              </tr>
            </table>
            <p><br>
              Alert Code, the Username who assigned the alert and whether to log alerts in history. This field shows all alerts assigned to this record. </p>
            <p>The format is as follows:</p>
            <p>~ALERTCODE~USERNAME{Tab Character}{Log in History Code}{Line Feed Character} followed by the next alert, if any.</p>
            <p>The third parameter is a blank space or &lsquo;0&rsquo; if &ldquo;Log Alert in History&rdquo; is not selected. If &ldquo;Log Alert&rdquo; is selected, this parameter is &lsquo;1&rsquo;. So a typical Alert record might look like this: </p>
            <p>~SH~JOE 0 ~TA~DAVE 1 </p>
            <p><strong>Note</strong>, this identifies two alerts, one for SH and the other for TA. The second alert has been marked to log alerts made in history. </p>
            <p><a href="#tablesmenu">Back To GoldMine Tables Menu</a></p>
            <a id="contsupp_e"></a>
            <h3>CONTSUPP - Automated Process Attached Event </h3>
            <p align="left"><span class="tablessubheader">RecType in Table:</span><strong> E</strong><br>
              <span class="tablessubheader">GoldMine Location: </span><strong>Attached Automated Process tracks.</strong><br>
              <br>
              All assigned AP tracks are stored in ContSupp. This stores the details of where the track is at, 
              what the next event is, who assigned the track and more.</p>
            <p align="left"><strong>Definitions/Descriptions:</strong><br>
              <strong>GoldMine Field:</strong> Field name when viewed in GoldMine. If blank, not visible in GoldMine. <br>
              <strong>User/System:</strong> Defines whether the User or the System sets and maintains this value.<br>
              <strong>Used For:</strong> The type of data stored in this field. If a value in single quotes (' '), this is the actual value stored in this field.<br>
            </p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Fields In Use in GoldMine</td>
              </tr>
              <tr>
                <td width="85" nowrap class="header">Field Name </td>
                <td width="110" align="center" nowrap class="header">GoldMine Field </td>
                <td width="85" align="center" nowrap class="header">Type</td>
                <td width="61%" nowrap class="header">Field Used For </td>
              </tr>
              <tr>
                <td width="85" class="pn">ACCOUNTNO</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">AccountNo of Linked Company</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECTYPE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">E</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">CONTACT</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Date/Time AP was attached. In format:<br>
                  YYYYMMDDHH:MM:SS</td>
              </tr>
              <tr>
                <td width="85" class="pn">TITLE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Link to Tracks.TrackNo for associated AP track.</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">CONTSUPREF</td>
                <td width="110" valign="top" class="pn">Next Event </td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Next event to be triggered. Duplicate of 
                  Tracks.Name</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">DEAR</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">Duplicate of Tracks.Toption1.</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">Next Event Number. Duplicate of Tracks.EventNo.</td>
              </tr>
              <tr>
                <td width="85" class="pn">FAX</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">LINKACCT</td>
                <td width="110" valign="top" class="pn">Last Event </td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Last time this event was processed. Format:<br>
                  YYYYMMDD.</td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">ADDRESS1</td>
                <td width="110" valign="top" class="pn">Process</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Process name. Duplicate of Tracks.Name for 
                  header record of AP track.</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS2</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS3</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">CITY</td>
                <td width="110" valign="top" class="pn">Action</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Text description of next action type. Based on 
                  Tracks.ActnType.</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">STATE</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ZIP</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Username that assigned the track.</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">COUNTRY</td>
                <td width="110" valign="top" class="pn">Trigger</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Number of days until event is triggered. Based on<br>
                  Tracks.NextActn.</td>
              </tr>
              <tr>
                <td width="85" class="pn">MERGECODES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATUS</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKEDDOC</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTEDATE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Record ID</td>
              </tr>
            </table>
            <p><a href="#tablesmenu">Back To GoldMine Tables Menu</a></p>
            <a id="contsupp_h"></a>
            <h3>CONTSUPP - Detail Header Records </h3>
            <p align="left"><span class="tablessubheader">RecType in Table:</span><strong> H</strong><br>
              <span class="tablessubheader">GoldMine Location: </span><strong>Used by Detail Records (Not visible)</strong><br>
              <br>
              Contains the information for extended detail tabs. This includes the names of the fields as well as the width of columns. Extended detail tabs are viewable by clicking the small arrows to the right of the tabs. They are created by entering field
              names under the Setup tab of a Detail record. The column widths are set by adjusting the column widths, then opening the Detail record, clicking the Setup tab and checking the option to &ldquo;Save Tab column positions&rdquo;.</p>
            <p align="left"><strong>Definitions/Descriptions:</strong><br>
              <strong>GoldMine Field:</strong> Field name when viewed in GoldMine. If blank, not visible in GoldMine. <br>
              <strong>User/System:</strong> Defines whether the User or the System sets and maintains this value.<br>
              <strong>Used For:</strong> The type of data stored in this field. If a value in single quotes (' '), this is the actual value stored in this field.<br>
            </p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Fields In Use in GoldMine</td>
              </tr>
              <tr>
                <td width="85" nowrap class="header">Field Name </td>
                <td width="110" align="center" nowrap class="header">GoldMine Field </td>
                <td width="85" align="center" nowrap class="header">Type</td>
                <td nowrap class="header">Field Used For </td>
              </tr>
              <tr>
                <td width="85" class="pn">ACCOUNTNO</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">&lsquo;H&rsquo; and Lookup.LookupSupp value</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECTYPE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">H</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTACT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">TITLE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTSUPREF</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Profile Name/Tab Name</td>
              </tr>
              <tr>
                <td width="85" class="pn">DEAR</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">&lsquo;0&rsquo; if there is a tab name</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">FAX</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKACCT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">User/System</td>
                <td class="pn">Field Labels</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS1</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS2</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS3</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">CITY</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ZIP</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">COUNTRY</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">User/System</td>
                <td class="pn">Column Widths</td>
              </tr>
              <tr>
                <td width="85" class="pn">MERGECODES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATUS</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKEDDOC</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTEDATE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Record ID</td>
              </tr>
            </table>
            <p><a href="#tablesmenu">Back To GoldMine Tables Menu</a></p>
            <a id="contsupp_l"></a>
            <h3>CONTSUPP - Linked Documents </h3>
            <p align="left"><span class="tablessubheader">RecType in Table:</span><strong> L</strong><br />
              <span class="tablessubheader">GoldMine Location: </span><strong>Links Tab</strong><br />
              <br />
              Contains the information needed to open a linked document as well as the synchronization settings.</p>
            <p align="left"><strong>Definitions/Descriptions:</strong><br />
              <strong>GoldMine Field:</strong> Field name when viewed in GoldMine. If blank, not visible in GoldMine. <br />
              <strong>User/System:</strong> Defines whether the User or the System sets and maintains this value.<br />
              <strong>Used For:</strong> The type of data stored in this field. If a value in single quotes (' '), this is the actual value stored in this field.<br />
            </p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Fields In Use in GoldMine</td>
              </tr>
              <tr>
                <td width="85" nowrap="nowrap" class="header">Field Name </td>
                <td width="110" align="center" nowrap="nowrap" class="header">GoldMine Field </td>
                <td width="85" align="center" nowrap="nowrap" class="header">Type</td>
                <td nowrap="nowrap" class="header">Field Used For </td>
              </tr>
              <tr>
                <td width="85" class="pn">ACCOUNTNO</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">AccountNo of Linked Company</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECTYPE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">L</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTACT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Username, Document extension and Date Created</td>
              </tr>
              <tr>
                <td width="85" class="pn">TITLE</td>
                <td width="110" class="pn">Type</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Description of document type</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTSUPREF</td>
                <td width="110" class="pn">Document</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Description of document</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">DEAR</td>
                <td width="110" valign="top" class="pn">Date</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Date, Time document linked. Format: YYYYMMDDHH:MM:SS</td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">FAX</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">LINKACCT</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">RecID of E-Mail record for e-mailed attachments.</td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Linked Doc Notes</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS1</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Document directory and name</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS2</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Continuation of document directory and name.</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS3</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">CITY</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ZIP</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">COUNTRY</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">MERGECODES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">STATUS</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Position 1=&rsquo;0&rsquo; if no notes, &lsquo;1&rsquo; if notes, &lsquo;A&rsquo; if the linked document is from an e-mail. The second position is sometimes used, it is typically &lsquo;0&rsquo;, but it&rsquo;s use is unknown.</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">LINKEDDOC</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">User/System</td>
                <td class="pn">Up to three parameters defining:<br />
                  <table width="90%" align="center">
                    <tr>
                      <td class="pn1">SYNC</td>
                      <td class="pn1">0=No, 1=Yes</td>
                    </tr>
                    <tr>
                      <td class="pn1">CREATETIME</td>
                      <td class="pn1">Format YYYYMMDDHHMM</td>
                    </tr>
                    <tr>
                      <td class="pn1">FILENAME</td>
                      <td class="pn1">Full file name of the document.</td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTEDATE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Record ID</td>
              </tr>
            </table>
            <p><a href="#tablesmenu">Back To GoldMine Tables Menu</a></p>
            <a id="contsupp_o"></a>
            <h3 >CONTSUPP - Organization Tree </h3>
            <p align="left"><span class="tablessubheader">RecType in Table:</span> <strong>O</strong> <br>
              <span class="tablessubheader">GoldMine Location: </span><strong>Org Chart to left of contact records.</strong><br>
              <br>
              Allows grouping of company records into an organizational layout.</p>
            <p align="left"><strong>Definitions/Descriptions:</strong><br>
              <strong>GoldMine Field:</strong> Field name when viewed in GoldMine. If blank, not visible in GoldMine. <br>
              <strong>User/System:</strong> Defines whether the User or the System sets and maintains this value.<br>
              <strong>Used For:</strong> The type of data stored in this field. If a value in single quotes (' '), this is the actual value stored in this field.<br>
            </p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Fields In Use in GoldMine</td>
              </tr>
              <tr>
                <td width="85" nowrap class="header">Field Name </td>
                <td width="110" align="center" nowrap class="header">GoldMine Field </td>
                <td width="85" align="center" nowrap class="header">Type</td>
                <td width="66%" nowrap class="header">Field Used For </td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">ACCOUNTNO</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">AccountNo of the Link Record. If the entry is not a Link then use the account number of the record that the tree is created under.</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECTYPE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">O</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">CONTACT</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">AccountNo of the record that the tree was originally 
                  created under.</td>
              </tr>
              <tr>
                <td width="85" class="pn">TITLE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">CONTSUPREF</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Stores the parent-child relationship. <br>
                  This relationship is stored in segments of 5 characters each.<br>
                  <strong>See the note below for details.</strong></td>
              </tr>
              <tr>
                <td width="85" class="pn">DEAR</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">&lsquo;1&rsquo; = Organization, &lsquo;3&rsquo; = Section or &lsquo;6&rsquo; = Link</td>
              </tr>
              <tr>
                <td width="85" class="pn">FAX</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKACCT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">ADDRESS1</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Title of the Org, Section, or Link. <br>
                  For every (5 
                  character) child/parent Segment add two spaces before the text.<br>
                  <strong>See the note below for details.</strong></td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS2</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS3</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">CITY</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ZIP</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">COUNTRY</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">MERGECODES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">Ownership field </td>
              </tr>
              <tr>
                <td width="85" class="pn">STATUS</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKEDDOC</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTEDATE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Record ID</td>
              </tr>
            </table>
            <br>
            <p><strong>Details on the formatting of the CONTSUPREF field.</strong></p>
            <p>CONTSUPREF is a character field but the segments are displayed using numbers (padded with zeros). They also pertain to the sorting of the entries in the Org Tree. </p>
            <p>A new Organization might have the following value in CONTSUPREF: <strong>10000</strong></p>
            <p>If you add a section (Section1) to that organization you might use: <strong>1000000500</strong><br>
              <strong>10000</strong> is the parent and <strong>00500</strong> is the child. Now every link or section under section1 must have at least this value (<strong>1000000500</strong>) in CONTSUPREF. </p>
            <p>Now let's say you add another section (Section2) under the org (not within the previous section) you might use: <strong>1000000510</strong></p>
            <p> <strong>00510</strong> is the child section and it will appear after (not inside of) Section1 because: </p>
            <ol>
              <li> It shares the same parent (<strong>10000</strong>)</li>
              <li>Iit's value is greater than Section1 (<strong>00510</strong> &gt; <strong>00500</strong>).</li>
            </ol>
            <p> Every link or section appearing under Section2 will have at least this value in CONTSUPREF. </p>
            <p>Now lets say that you want to add a Section (Section2a) inside of Section2. You might use: <strong>100000051000500</strong></p>
            <p> Again the same rules apply. We can see how the parent number is here (<strong>1000000510</strong>) and the child number is appended (<strong>00500</strong>).</p>
            <p> Organizations will start the initial parent number and only sections can add to it. Links do not add a child value they use the section's value+space+Contact name. This provides a sorting mechanism for Links within a section. Adding 'Joe Bloggs'
              to Section2 might yield: <strong>1000000510</strong> Joe Bloggs</p>
            <p> Note that if the contact name gets truncated due to insufficient field length, it will not hurt the data </p>
            <p>You can have a maximum of 5 sections within an Organization.</p>
            <p><a href="#tablesmenu">Back To GoldMine Tables Menu</a></p>
            <a id="contsupp_p"></a>
            <h3>CONTSUPP - Details / Profiles </h3>
            <p align="left"><span class="tablessubheader">RecType in Table:</span> <strong>P</strong> <br>
              <span class="tablessubheader">GoldMine Location: </span><strong>Details Tab, Extended Tabs</strong><br>
              <br>
              This is the &ldquo;catch all&rdquo; location for storing any records that may exist multiple times for the associated contact. Examples of this might be Serial #s, Products purchased, Equipment used, etc. This tab is used for anything that does not
              fit well in custom fields in the Contact2 database. Each detail record can be &ldquo;extended&rdquo; to include 8 additional fields. In GoldMine, this is accessible via the Info tab of a Detail record. The Setup tab of this same Detail record identifies
              the field names for each of these 8 fields. You only need to save these once and they will be used for this same profile record (identified by the value in the Contact field) in the future. This information is stored in a Header record in the ContSupp
              table, identified by an H rectype..</p>
            <p align="left"><strong>Definitions/Descriptions:</strong><br>
              <strong>GoldMine Field:</strong> Field name when viewed in GoldMine. If blank, not visible in GoldMine. <br>
              <strong>User/System:</strong> Defines whether the User or the System sets and maintains this value.<br>
              <strong>Used For:</strong> The type of data stored in this field. If a value in single quotes (' '), this is the actual value stored in this field.<br>
            </p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Fields In Use in GoldMine</td>
              </tr>
              <tr>
                <td width="85" nowrap class="header">Field Name </td>
                <td width="110" align="center" nowrap class="header">GoldMine Field </td>
                <td width="85" align="center" nowrap class="header">Type</td>
                <td nowrap class="header">Field Used For </td>
              </tr>
              <tr>
                <td width="85" class="pn">ACCOUNTNO</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Link to Contact1 Record</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECTYPE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">P</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTACT</td>
                <td width="110" class="pn">Detail</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Profile Name</td>
              </tr>
              <tr>
                <td width="85" class="pn">TITLE</td>
                <td width="110" class="pn">Field 1 </td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Extended Detail Data</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTSUPREF</td>
                <td width="110" class="pn">Reference</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Reference</td>
              </tr>
              <tr>
                <td width="85" class="pn">DEAR</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Link to Lookup.LookupSupp</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT</td>
                <td width="110" class="pn">Field 5 </td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Extended Detail Data</td>
              </tr>
              <tr>
                <td width="85" class="pn">FAX</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKACCT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="110" class="pn">Notes</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Notes</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS1</td>
                <td width="110" class="pn">Field 7 </td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Extended Detail Data</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS2</td>
                <td width="110" class="pn">Field 8 </td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Extended Detail Data</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS3</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">CITY</td>
                <td width="110" class="pn">Date</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Create By, Date, Time (under Audit Tab)</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATE</td>
                <td width="110" class="pn">Field 6 </td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Extended Detail Data</td>
              </tr>
              <tr>
                <td width="85" class="pn">ZIP</td>
                <td width="110" class="pn">Field 4 </td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Extended Detail Data</td>
              </tr>
              <tr>
                <td width="85" class="pn">COUNTRY</td>
                <td width="110" class="pn">Field 3 </td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Extended Detail Data</td>
              </tr>
              <tr>
                <td width="85" class="pn">MERGECODES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">STATUS</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Position 1 = &lsquo;0&rsquo;<br>
                  Position 2 = &lsquo;1&rsquo; if Notes, Otherwise 0</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKEDDOC</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="110" class="pn">User</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Audit Tab, Last Update Section</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTEDATE</td>
                <td width="110" class="pn">Date</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Audit Tab, Last Update Section</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="110" class="pn">Time</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Audit Tab, Last Update Section</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Record ID</td>
              </tr>
            </table>
            <p><a href="#tablesmenu">Back To GoldMine Tables Menu</a></p>
            <a id="contsupp_e1"></a>
            <h3 >CONTSUPP - Email Addresses</h3>
            <p align="left"><span class="tablessubheader">RecType in Table:</span> <strong>P</strong> <br>
              <span class="tablessubheader">GoldMine Location: </span><strong>Details Tab - Email Addresses</strong></p>
            <p align="left">All e-mail addresses are stored in this table. There are different   variations of emails and below are the settings of the various fields   that define them.<br />
              The Contact field is always  = &ldquo;E-Mail Address&rdquo; and the   ContSupRef+Address1 fields are always            the actual e-mail address.</p>
            <p align="left"><strong>Definitions/Descriptions:</strong><br>
              GoldMine Field: Field name when viewed in GoldMine. If blank, not visible in GoldMine. <br />
              User/System: Defines whether the User or the System sets and maintains this value.<br />
              Used For: The type of data stored in this field. If a value in single quotes (' '), this is the actual value stored in this field.<br>
            </p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Fields In Use in GoldMine</td>
              </tr>
              <tr>
                <td width="85" nowrap class="header">Field Name </td>
                <td width="110" align="center" nowrap class="header">GoldMine Field </td>
                <td width="85" align="center" nowrap class="header">Type</td>
                <td width="66%" nowrap class="header">Field Used For </td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">ACCOUNTNO</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Link to Contact1 Record</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECTYPE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">P</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">CONTACT</td>
                <td width="110" valign="top" class="pn">Detail</td>
                <td width="85" align="center" valign="top" class="pn">User</td>
                <td class="pn">'E-mail Address'</td>
              </tr>
              <tr>
                <td width="85" class="pn">TITLE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">CONTSUPREF</td>
                <td width="110" valign="top" class="pn">Reference</td>
                <td width="85" align="center" valign="top" class="pn">User</td>
                <td class="pn">The actual E-Mail Address of the contact &quot;name@domain.com&quot;</td>
              </tr>
              <tr>
                <td width="85" class="pn">DEAR</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">If Un-Attached E-Mail, the Lookup.LookupSupp value for E-Mail addresses</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">FAX</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKACCT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">If E-Mail of Secondary contact, then RecID of that contact record.</td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">ADDRESS1</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">User</td>
                <td class="pn">If E-Mail address is too long, this stores the remainder of the address.</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS2</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Contact name for addressing e-mail. Shown in &lt;&gt;                 when viewing the E-Mail address in the Reference field.</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS3</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">CITY</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ZIP</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Binary Switch<br />
                  <br />
                  Position 1 = TEXT (0) or HTML (1)<br />
                  Position 2 = Primary address (1) or normal (0)<br />
                  Position 3 = Wrap Lines(1) no wrap (0)<br />
                  Position 4 = MIME(1) or not MIME(0) - if set to 0 then position 1 must also be 0<br />
                  <br />
                  e.g.<br />
                  <br />
                  1001 = MIME and HTML Email<br />
                  1101 = MIME and HTML Email and Primary  Email</td>
              </tr>
              <tr>
                <td width="85" class="pn">COUNTRY</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">MERGECODES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATUS</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Blank if attached Address, If Un-attached, &lsquo;00&rsquo;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKEDDOC</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTEDATE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Record ID</td>
              </tr>
            </table>
            <p><a href="#tablesmenu">Back To GoldMine Tables Menu</a></p>
            <a id="contsupp_r"></a>
            <h3>CONTSUPP - Referrals </h3>
            <p align="left"><span class="tablessubheader">RecType in Table:</span><strong> R</strong><br>
              <span class="tablessubheader">GoldMine Location: </span><strong>Referrals Tab</strong><br>
              <br>
              Each referral created generates two ContSupp records, one for each record that is linked to the 
              other.</p>
            <p align="left"><strong>Definitions/Descriptions:</strong><br>
              <strong>GoldMine Field:</strong> Field name when viewed in GoldMine. If blank, not visible in GoldMine. <br>
              <strong>User/System:</strong> Defines whether the User or the System sets and maintains this value.<br>
              <strong>Used For:</strong> The type of data stored in this field. If a value in single quotes (' '), this is the actual value stored in this field.<br>
            </p>
            <table width="100%" border="1" cellpadding="0" cellspacing="0" class="gmtables">
              <tr>
                <td colspan="4" class="mainheader">Fields In Use in GoldMine</td>
              </tr>
              <tr>
                <td width="85" nowrap class="header">Field Name </td>
                <td width="110" align="center" nowrap class="header">GoldMine Field </td>
                <td width="85" align="center" nowrap class="header">Type</td>
                <td width="66%" nowrap class="header">Field Used For </td>
              </tr>
              <tr>
                <td width="85" class="pn">ACCOUNTNO</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">AccountNo of Linked Company</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECTYPE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">R</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTACT</td>
                <td width="110" class="pn">Reference</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">&ldquo;To&rdquo; or &ldquo;For&rdquo; and the linked company name.</td>
              </tr>
              <tr>
                <td width="85" class="pn">TITLE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">AccountNo of linked record.</td>
              </tr>
              <tr>
                <td width="85" class="pn">CONTSUPREF</td>
                <td width="110" class="pn">Referal</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Reference field for the referral.</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">DEAR</td>
                <td width="110" valign="top" class="pn">Reference</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">Remainder of Contact field (i.e. Company name) if 
                  longer than 40 characters.</td>
              </tr>
              <tr>
                <td width="85" class="pn">PHONE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">EXT</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">&lsquo;T&rsquo; if the referrer, &lsquo;R&rsquo; if the referree.</td>
              </tr>
              <tr>
                <td width="85" class="pn">FAX</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">LINKACCT</td>
                <td width="110" valign="top" class="pn">&nbsp;</td>
                <td width="85" align="center" valign="top" class="pn">System</td>
                <td class="pn">RecID of the linked record&rsquo;s ContSupp referral 
                  record.</td>
              </tr>
              <tr>
                <td width="85" class="pn">NOTES</td>
                <td width="110" class="pn">Notes</td>
                <td width="85" align="center" class="pn">User</td>
                <td class="pn">Notes</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS1</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS2</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">ADDRESS3</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">CITY</td>
                <td width="110" class="pn">Date</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Create By, Date, Time (under Audit Tab)</td>
              </tr>
              <tr>
                <td width="85" valign="top" class="pn">STATE</td>
                <td width="110" valign="top" class="pn">Status Tab </td>
                <td width="85" align="center" valign="top" class="pn">User</td>
                <td class="pn">Several flags for the options on the Status Tab of the 
                  Referral record. <br>
                  If &lsquo;1&rsquo;, the option is checked, if &lsquo;0&rsquo;, it 
                  is un-checked.<br>
                  <table width="90%" align="center" cellpadding="0" cellspacing="0" class="gmtables">
                    <tr>
                      <td align="center" nowrap class="subHead">Position</td>
                      <td class="subHead">Description</td>
                    </tr>
                    <tr>
                      <td width="14%" align="center" class="gmtablerowrow">1</td>
                      <td width="86%" class="gmtablerowrow">Initial Contact</td>
                    </tr>
                    <tr>
                      <td align="center" class="pn1">2</td>
                      <td class="pn1">Interest Confirmed</td>
                    </tr>
                    <tr>
                      <td align="center" class="gmtablerowrow">3</td>
                      <td class="gmtablerowrow"> Identified Key Players</td>
                    </tr>
                    <tr>
                      <td align="center" class="pn1">4</td>
                      <td class="pn1">Evaluation Requested</td>
                    </tr>
                    <tr>
                      <td align="center" class="gmtablerowrow">5</td>
                      <td class="gmtablerowrow"> Evaluation INP</td>
                    </tr>
                    <tr>
                      <td align="center" class="pn1">6</td>
                      <td class="pn1">Evaluation Positive</td>
                    </tr>
                    <tr>
                      <td align="center" class="gmtablerowrow">7</td>
                      <td class="gmtablerowrow">Making Decision</td>
                    </tr>
                    <tr>
                      <td align="center" class="pn1">8</td>
                      <td class="pn1">Verbal Agreement</td>
                    </tr>
                    <tr>
                      <td align="center" class="gmtablerowrow">9</td>
                      <td class="gmtablerowrow">Project Funded</td>
                    </tr>
                    <tr>
                      <td align="center" class="pn1">10</td>
                      <td class="pn1">Purchase Order</td>
                    </tr>
                    <tr>
                      <td align="center" class="gmtablerowrow">11</td>
                      <td class="gmtablerowrow">Product Delivery</td>
                    </tr>
                    <tr>
                      <td align="center" class="pn1">12</td>
                      <td class="pn1">Done!</td>
                    </tr>
                    <tr>
                      <td align="center" class="gmtablerowtop">13</td>
                      <td class="gmtablerowtop">Lost Sale</td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td width="85" class="pn">ZIP</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">COUNTRY</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">MERGECODES</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">STATUS</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Position 1=&rsquo;0&rsquo;, Position 2=&rsquo;1&rsquo; if notes, otherwise &lsquo;0&rsquo;.</td>
              </tr>
              <tr>
                <td width="85" class="pn">LINKEDDOC</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTUSER</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTEDATE</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">LASTTIME</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">&nbsp;</td>
                <td class="pn">&nbsp;</td>
              </tr>
              <tr>
                <td width="85" class="pn">RECID</td>
                <td width="110" class="pn">&nbsp;</td>
                <td width="85" align="center" class="pn">System</td>
                <td class="pn">Record ID</td>
              </tr>
            </table>
            <p><a href="#tablesmenu">Back To GoldMine Tables Menu</a></p>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseSeven">
          <h4 class="panel-title"> #7 The SQL Select Statement</h4>
        </a> </div>
        <div id="collapseSeven" class="panel-collapse collapse">
          <div class="panel-body">
            <p style="line-height:1.5">The SELECT statement is used to select or retrieve data from one or more SQL database tables. The result is stored in a result table, called the result-set.</p>
            <p>SQL is NOT case sensitive: SELECT is the same as select.</p>
            <p> The following is the basic SQL SELECT Syntax </p>
            <div style="width:400px; background-color:#CC0">
              <div> SELECT <em>column_name</em>,<em> column_name,<em> column_name</em></em><br />
                FROM <em>table_name</em></div>
            </div>
            <p></p>
            <p><strong>Example: </strong>If we wanted to display all the Primary Contacts from GoldMine with specific columns/fields we could use the following:</p>
            <div style="width:834px; background-color:#FC0">
              <div> SELECT <em>Company</em>,<em> Contact,<em> Phone1, Phone2, Address1, City, State, Zip, Title, </em></em>Key1, Key2, Key3, Key4, Key5<br />
                FROM <em>Contact1</em></div>
            </div>
            <p></p>
            <p>or to show ALL the Primary Contacts and ALL the fields we could use the following:</p>
            <div style="width:300px; background-color:#FC0">
              <div> SELECT <em>*</em><br />
                FROM <em>Contact1</em> </div>
            </div>
            <p></p>
            <p style="line-height:1.5">The * (asterick) is a wildcard that displays all columns in the table. This can be useful, when you are not sure what the field/column name is called that you want to select you can initially show every column, and then modify your select statement to show just the columns you want to see.</p>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseEight">
          <h4 class="panel-title"> #8 Sorting/Ordering Data and SQL Aliases</h4>
        </a> </div>
        <div id="collapseEight" class="panel-collapse collapse">
          <div class="panel-body">
          <h2><strong>Sorting/Ordering Data</strong></h2>
            <p style="line-height:1.5">When we run a select statement, the result set is not sorted/ordered in any way. This is because the data is displayed in the order it was entered into the database table. In order to SORT/ORDER the result set we use the <strong>ORDER BY </strong>clause. The default sort order is in ascending order <strong>(A to Z)</strong>. </p>
            <div style="width:834px; background-color:#FC0">
              <div> SELECT <em>Company</em>,<em> Contact,<em> Phone1, Phone2, Address1, City, State, Zip, Title, </em></em>Key1, Key2, Key3, Key4, Key5<br />
                FROM <em>Contact1<br />
                  <strong>ORDER BY</strong> Contact</em><br />
              </div>
            </div>
            <p></p>
            <p style="line-height:1.5">The above statement will select all the Primary Contacts with the selected fields and order them alphabetically by the Contact name in <strong>ascending order</strong> (A to Z). 
              We could also add <strong>ASC</strong> after Contact in the ORDER BY clause to sort it in Ascending Order but since it is the default sort order it is not necessary to add ASC. </p>
            <p style="line-height:1.5"> If we want to sort in <strong>descending order (Z to A)</strong> we append <strong>DESC</strong> after the Order By column.  What if we want to order it by Lastname and by Firstname which is stored in the <strong>DEAR</strong> Field. Then we would add <strong>DESC</strong> after each field. It will order it by which ever field is listed first and then by the second field as a secondary sort.</p>
            <div style="width:400px; background-color:#FC0">
              <div> SELECT <em>Company</em>,<em> Contact,<em> Dear, Lastname</em></em><br />
                FROM <em>Contact1<br />
                  <strong>ORDER BY</strong></em> <em>Lastname </em><strong>DESC</strong>, <em>Dear</em> <strong>DESC</strong><br />
              </div>
            </div>
            <h2><strong> SQL aliases</strong></h2>
            <p style="line-height:1.5">Next we will discuss<strong> SQL aliases</strong>. SQL aliases are used to give a database table, or a column in a table, a temporary name or a more meaningful name. Basically aliases are created to make column names more readable. For most advanced GoldMine users/administrators, they know that the KEY1 field in GoldMine is the Contact Type field, and that KEY2 may refer to the Industry or some other contact related data, and as seen in our example above, the DEAR field is where we like to store the contacts first name, this is because GoldMine does not have a firstname field. For your typical end-users it might not be as clear/well known. In SQL we can reference/refer to any field name as something else using the <strong>AS</strong> clause. The syntax works/looks like this:</p>
            <div style="width:460px; background-color:#FC0">
              <div> SELECT <em>Company</em>,<em> Contact,<em> <strong>Dear AS Firstname</strong>, Lastname</em></em><br />
                FROM <em>Contact1<br />
                  <strong>ORDER BY</strong></em> <em>Lastname </em><strong>DESC</strong>, <em>Dear</em> <strong>DESC</strong><br />
              </div>
            </div>
            <p></p>
            <p>If your new aliased column name has a space in it you need to surround it with  single quotes. <br />
            </p>
            <div style="width:460px; background-color:#FC0">
              <div> SELECT <em>Company</em>,<em> Contact,<em> Dear <strong>AS 'First Name',</strong> Lastname</em></em><br />
                FROM <em>Contact1<br />
                  <strong>ORDER BY</strong></em> <em>Lastname </em><strong>DESC</strong>, <em>Dear</em> <strong>DESC</strong><br />
              </div>
            </div>
            <p></p>
            <p>** The AS clause is actually not necessary, but it is a good habit to use it. You may run into some queries where it is omiitted, so don't be alarmed.</p>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseNine">
          <h4 class="panel-title"> #9 Filtering Data using WHERE, AND, OR, IN, NOT, LIKE</h4>
        </a> </div>
        <div id="collapseNine" class="panel-collapse collapse">
          <div class="panel-body">
            <h2><strong>WHERE</strong></h2>
            <p style="line-height:1.5">You very seldom want to see all of the data in a database. Most likely you will want only a select few records based on some filter criteria. <br />
              The <strong>WHERE</strong> clause in SQL allows us to filter the data that is returned in our result set.</p>
            <p style="line-height:1.5">The following is the SQL SELECT Syntax with a WHERE clause:</p>
            <div style="width:410px; background-color:#CC0">
              <div> SELECT <em>column_name</em>,<em> column_name,<em> column_name</em></em><br />
                FROM <em>table_name<br />
                  WHERE column_name = 'value' </em> </div>
            </div>
            
            <p>and</p>
            
            <div style="width:270px; background-color:#CC0">
              <div> SELECT <em>*</em><em></em><br />
                FROM <em>table_name</em><br />
                <em><strong>WHERE</strong> column_name = 'value' </em></div>
            </div>
            <p style="line-height:1.5"><strong>Example</strong>: Select Company, Contact, Address, City, State, Zip, Phone1 from the Primary Contacts 
              where the State is equal to New York.</p>
            <div style="width:440px; background-color:#FC0">
              <div> SELECT <em>Company</em>,<em> Contact,<em> Address1, City, State, Zip, Phone1</em></em><br />
                FROM <em>Contact1<br />
                  <strong>WHERE State = 'NY'</strong></em><br />
              </div>
            </div>
            <p>Now order it by the company name.</p>
            <div style="width:440px; background-color:#FC0">
              <div> SELECT <em>Company</em>,<em> Contact,<em> Address1, City, State, Zip, Phone1</em></em><br />
                FROM <em>Contact1<br />
                  <strong>WHERE State = 'NY'<br />
                    ORDER BY company </strong></em> </div>
            </div>
            <p><strong>Example: </strong>Select all the Additional Contacts from the database. </p>
            <p style="line-height:1.5"> We know from our discussion above about the <a href="#GMtabledefinitions">GoldMine Table Definitions</a>, that all Additional Contacts are stored in the Contsupp database table, and are the rows in the database table where the Rectype column/field is equal to C. So with this knowledge we can write the following SQL Query:</p>
            <div style="width:300px; background-color:#FC0">
              <div> SELECT <em>*</em><em><em></em></em><br />
                FROM <em>Contsupp<br />
                  <strong>WHERE Rectype='C'</strong></em><br />
              </div>
            </div>
            <p>Now granted, we probably don't need to see every column in Contsupp, but once you do you can decide which columns/fields you need to display.</p>
            <hr />
            <p>Up till now we've used the <strong>Equal to</strong> ( = ) operand to filter records. The following is a list of options for comparison/filtering.</p>
            <table width="452" border="0" cellspacing="3" cellpadding="3" style="font-size:14px; font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif">
              <tr>
                <td width="185" bgcolor="#CCCCCC"><strong>=</strong></td>
                <td width="246" bgcolor="#CCCCCC"><strong>Equal To</strong></td>
              </tr>
              <tr>
                <td bgcolor="#CCCC00"><strong>&lt;&gt;</strong></td>
                <td bgcolor="#CCCC00"><strong>Not Equal To</strong></td>
              </tr>
              <tr>
                <td bgcolor="#CCCCCC"><strong>&lt;</strong></td>
                <td bgcolor="#CCCCCC"><strong>Less Than</strong></td>
              </tr>
              <tr>
                <td bgcolor="#CCCC00"><strong>&lt;=</strong></td>
                <td bgcolor="#CCCC00"><strong>Less Than or Equal To</strong></td>
              </tr>
              <tr>
                <td bgcolor="#CCCCCC"><strong>&gt;</strong></td>
                <td bgcolor="#CCCCCC"><strong>Greater Than</strong></td>
              </tr>
              <tr>
                <td bgcolor="#CCCC00"><strong>&gt;=</strong></td>
                <td bgcolor="#CCCC00"><strong>Greater Than or Equal To</strong></td>
              </tr>
              <tr>
                <td bgcolor="#CCCCCC"><strong>Between</strong></td>
                <td bgcolor="#CCCCCC"><strong>Between 2 values</strong></td>
              </tr>
              <tr>
                <td bgcolor="#CCCC00"><strong>IS NULL</strong></td>
                <td bgcolor="#CCCC00"><strong>Is a Null Value</strong></td>
              </tr>
              <tr>
                <td bgcolor="#CCCCCC"><strong>IS NOT NULL</strong></td>
                <td bgcolor="#CCCCCC"><strong>Is not a Null Value</strong></td>
              </tr>
            </table>
            <br>
            <p style="line-height:1.5"> NULL values represent missing unknown data. By default, a table column can hold NULL values. If a column/field in a table is optional, meaning we can insert a new record or update an existing record without adding a value to this column/field.  This  means that the field will be saved with a NULL value. NULL values are treated differently from other values.  NULL is used as a placeholder for unknown or inapplicable values.</p>
            <table>
              <tbody>
                <tr>
                  <th><img src="http://www.w3schools.com/images/lamp.jpg" alt="Note" /></th>
                  <td><strong>Note:</strong> It is not possible to compare NULL and 0; they are not equivalent. NULL is not the same as EMPTY either. </td>
                </tr>
              </tbody>
            </table>
            <br />
            <p>Look at the following &quot;Person&quot; table:</p>
            <h4>PERSON</h4>
            <table width="100%" cellpadding="5" cellspacing="4" style="font-family:'Lucida Sans Unicode', 'Lucida Grande', sans-serif; font-size:14px">
              <tbody>
                <tr>
                  <th>Id</th>
                  <th>LName</th>
                  <th>FName</th>
                  <th>Address1</th>
                  <th>City</th>
                </tr>
                <tr>
                  <td>1</td>
                  <td>Hansen</td>
                  <td>Ola</td>
                  <td> </td>
                  <td>Sandnes</td>
                </tr>
                <tr>
                  <td>2</td>
                  <td>Svendson</td>
                  <td>Tove</td>
                  <td>Borgvn 23</td>
                  <td>Sandnes</td>
                </tr>
                <tr>
                  <td>3</td>
                  <td>Pettersen</td>
                  <td>Kari</td>
                  <td> </td>
                  <td>Stavanger</td>
                </tr>
              </tbody>
            </table>
            <p style="line-height:1.5">Suppose that the &quot;Address1&quot; column in the &quot;Person&quot; table is optional.   This means that if we insert a record with no value for the  &quot;Address&quot; column, the &quot;Address1&quot; column will be saved with a NULL value. How can we test for NULL values? It is not possible to test for NULL values with comparison operators, such as =, &lt;, or &lt;&gt;.      We will have to use the<strong> IS NULL</strong> and <strong>IS NOT NULL</strong> operators instead.  To learn more <a href="http://www.w3schools.com/sql/sql_isnull.asp" target="_blank">click here</a></p>
            <hr />
            <h2><strong>AND &amp; OR</strong></h2>
            <p style="line-height:1.5">What if we wanted to use multiple filter criteria.  
              For this we use the <strong>AND &amp; OR </strong>operators. </p>
            <p><strong>Example: </strong>Display all History records that were completed so far this year? </p>
            <div style="width:500px; background-color:#FC0">
              <div> SELECT <em>*</em><em><em></em></em><br />
                FROM <em>Conthist<br />
                  <strong>WHERE ondate between '1/1/2014' and '3/19/2014'</strong></em><br />
              </div>
            </div>
            <p><br />
              <strong>Example: </strong>What if we wanted to show all the Additional Contacts with a Title of Vice President? </p>
            <div style="width:500px; background-color:#FC0">
              <div> SELECT <em>*</em><br />
                FROM <em>Contsupp <br />
                  <strong>WHERE Rectype = 'C' AND Title = 'Vice President'</strong></em><br />
              </div>
            </div>
            <p><strong>Example: </strong>What if we wanted to display all of the  E-mail Addresses with their associated email merge codes?</p>
            <div style="width:500px; background-color:#FC0">
              <div> SELECT<em> Contsupref+Address1 as Email, Mergecodes</em><br />
                FROM <em>Contsupp <br />
                  <strong>WHERE Rectype = 'P' AND Contact = 'E-mail Address'</strong></em><br />
              </div>
            </div>
            <p><strong>Example:</strong> How about a list of all primary contacts in a particular set of States? </p>
            <div style="width:670px; background-color:#FC0">
              <div> SELECT<em> Company, Contact, City, State, Zip</em><br />
                FROM <em>Contact1<br />
                  <strong>WHERE State = 'NY' OR State = 'CT' OR State = 'ME' OR State = 'VT' OR State = 'NH'</strong></em><br />
              </div>
            </div>
            <p><strong>Example:</strong> How about a list of all the primary contacts in a particular set of States and where the Title is CEO? <br />
            </p>
            <p>You might think the following SQL Query would work....</p>
            <div style="width: 600px; background-color: #FB6877">
              <div> SELECT<em> Company, Contact, City, State, Zip</em><br />
                FROM <em>Contact1<br />
                  <strong>WHERE Title = 'CEO' and State = 'NY' OR State = 'CT' </strong></em> </div>
            </div>
            <p style="line-height:1.5">BUT, when using both AND &amp; OR we must remember that SQL needs to utilize the <strong>order of operations</strong>. In the above SQL statement SQL will think that we want all the contacts that have a title of CEO and are in the State of NY, or all Contacts that are in CT. When what we really want is all primary contacts that are in NY or CT, and have a title of CEO. <strong>In order to define the Order of Operations we must use Parenthesis</strong>.</p>
            <p> Here is the correct way:</p>
            <div style="width: 600px; background-color: #FC0">
              <div> SELECT<em> Company, Contact, City, State, Zip</em><br />
                FROM <em>Contact1<br />
                  <strong>WHERE Title = 'CEO' and (State = 'NY' OR State = 'CT' </strong></em>)<br />
              </div>
            </div>
            <p>A good rule of thumb is that if you are using AND &amp; OR together you need to use parenthesis.</p>
            <hr />
            <h2><strong>The IN Operator</strong></h2>
            <p style="line-height:1.5">In our exampe above where we were looking for contacts in a particular list of states, we used multiple OR statements, but what if we were looking for all contacts in 25 different states, that would be A LOT of OR statements. Lucky for us there is the IN operator, it allows us to define a list of values that the field should contain or be in. It looks like this:</p>
            <div style="width:600px; background-color:#FC0">
              <div> SELECT<em> Company, Contact, City, State, Zip</em><br />
                FROM <em>Contact1<br />
                  </em><strong>WHERE State IN</strong><em><strong> ('NY', 'CT', 'ME', 'VT', 'NH', 'RI', 'MA'</strong></em>)<br />
              </div>
            </div>
            <hr />
            <h2><strong>The NOT Operator</strong></h2>
            <p>The NOT operator basically returns  the opposite of what ever operator comes after it.</p>
            <p><strong>Example: </strong></p>
            <div style="width:600px; background-color:#FC0">
              <div> SELECT<em> Company, Contact, City, State, Zip</em><br />
                FROM <em>Contact1<br />
                  </em><strong>WHERE State</strong> <strong>NOT IN </strong><em><strong>('NY', 'CT', 'ME', 'VT', 'NH', 'RI', 'MA'</strong></em>)<br />
              </div>
            </div>
            <hr />
            <h2><strong>The LIKE Operator</strong></h2>
            <p style="line-height:1.5">The LIKE operator allows us to find values in fields that &quot;contains&quot;, &quot;begins with&quot;, or &quot;ends with&quot; a specific string or value. The _ is a wild card character that can be used to match exactly one character space before or after our value, and the % sign is a wild card that can be used to match any number of characters before or after the value we are looking for.
              
              For instance, what if we wanted to find all Contacts that have a Company name that begins with the word
              First?<br />
              <br />
              <strong>Example: </strong><br />
            </p>
            <div style="width:500px; background-color:#FC0">
              <div> SELECT<em> Company, Contact</em><br />
                FROM <em>Contact1<br />
                  </em><strong>WHERE Company</strong> <strong>LIKE </strong><em><strong> 'First%'</strong></em><br />
              </div>
            </div>
            <p style="line-height:1.5">What  if we wanted all Contacts with a Title of President, Vice President, Associate President, Presidents Aid?<br />
              Well all the titles have the value President in it, so we could do the following: </p>
            <p><strong>Example: </strong></p>
            <div style="width:400px; background-color:#FC0">
              <div> SELECT<em> Company, Contact</em>, Title<br />
                FROM <em>Contact1<br />
                  </em><strong>WHERE Title</strong> <strong>LIKE </strong><em><strong> '%President%'</strong></em><br />
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseTen">
          <h4 class="panel-title"> #10 Selecting Data from Multiple Database Tables</h4>
        </a> </div>
        <div id="collapseTen" class="panel-collapse collapse">
          <div class="panel-body"> You really start to see the power of SQL when you want to select data from multiple database tables. To select data from multiple tables we need to use the SQL JOIN statement. There are a few different types of JOINS.
            The Following Image gives a good visual interpretation of the various SQL JOINS. <br>
            <img src="Visual_SQL_JOINS_orig.jpg" class="img-responsive">
            <p>Before we continue with examples, we will list the types of the different SQL JOINs you can use:</p>
<p>
    <strong>INNER JOIN:</strong> Returns all rows when there is at least one match in BOTH tables<br>
    <strong>LEFT JOIN:</strong> Return all rows from the left table, and the matched rows from the right table<br>
    <strong>RIGHT JOIN:</strong> Return all rows from the right table, and the matched rows from the left table<br>
    <strong>FULL JOIN:</strong> Return all rows when there is a match in ONE of the tables<br>
</p>
            <h3>INNER JOIN</h3>
            <p style="line-height:1.5">An INNER JOIN or JOIN (they are both the same) is the simplest, most understood Join and is the most common. This query will return all of the records in the left table (table A) that have a matching record in the right table (table B).  In GoldMine we know that tables are joined via the Accountno field. For a more detailed explanation of the different SQL JOINS. Please <a href="http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins" target="_blank">click here</a>.</p>
            <p><strong>Example:</strong> Lets display All the Primary Contacts and their associated Contact2 (user defined fields)</p>
            <div style="width:800px; background-color:#FC0">
              <div> SELECT<em> Contact1.Accountno, Contact1.Company, Contact1.Contact</em>, Contact2.Userdef01, Contact2.Userdef02<br />
                FROM <em>Contact1 <br />
                  <strong>INNER JOIN</strong> Contact2</em><strong> <br />
                    <strong> ON </strong> Contact1.Accountno=Contact2.Accountno</strong><em><strong></strong></em><br />
              </div>
            </div>
            <p style="line-height:1.5">In the above query we are using fully qualified column names (Table.Field). We must do this when using multiple tables because if two tables had the same field name how would SQL know which field you are referring to. Also we may want to use <strong>Table Aliasing</strong> like when we used field aliasing. <br />
              Table Aliasing looks like this, remember when we did field aliasing that we used the <strong>AS</strong> clause, well its not necessary so here we are omitting it.</p>
            <div style="width:800px; background-color:#FC0">
              <div> SELECT<em> <strong>C1.</strong>Accountno, <strong>C1.</strong>Company, <strong>C1.</strong>Contact</em>, <strong>C2.</strong>Userdef01,<strong> C2.</strong>Userdef02<br />
                FROM <em>Contact1 <strong>C1<br />
                  <strong>INNER JOIN</strong> Contact2 C2</strong></em><strong><strong> <br />
                    <strong> ON </strong> C1.Accountno=C2.Accountno</strong><em><strong></strong></em><br />
                  </strong></div>
            </div>
            <strong> <br>
              <p>Another way of writing the basic INNER JOIN is as follows:</p>
              <div style="width:680px; background-color:#FC0">
                <div> SELECT<em> <strong>C1.</strong>Accountno, <strong>C1.</strong>Company, <strong>C1.</strong>Contact</em>, <strong>C2.</strong>Userdef01,<strong> C2.</strong>Userdef02<br />
                  FROM <em>Contact1 <strong>C1, </strong></em><em>Contact2 <strong>C2</strong><br />
                    WHERE </em> <strong>C1.</strong>accountno=<strong>C2.</strong>accountno<br />
                </div>
              </div>
              <br>
              </strong>
            <h3><strong>JOINING 3 OR MORE TABLES</strong></h3>
            <p>In the above query we joined 2 tables via the Accountno. In GoldMine you'll most likely be Joining the Contact1 table with other tables. <br />
              <br />
              <strong>What if for instance we wanted to display all of the Primary Contacts (Contact1) with a Pending Sale (Cal) and also show the last time they were contacted (Contact2).</strong></p>
            <div style="width:600px; background-color:#FC0">
              <div> SELECT<em> <strong>C1.</strong>Accountno, <strong>C1.</strong>Company, <strong>C1.</strong>Contact</em>, <strong>C2.</strong>Lastconton<br />
                FROM <em>Contact1 <strong>C1</strong><br />
                  </em><strong>INNER JOIN Contact2</strong><em> <strong>C2</strong></em><strong>ON C1.</strong>Accountno=<strong>C2.</strong>Accountno <br />
                <strong>INNER JOIN</strong> <strong>Cal ON C1.</strong>Accountno=<strong>Cal.</strong>Accountno and <strong>Cal.</strong>Rectype='S'<br />
                ORDER BY <strong>C2.</strong>Lastconton <br />
              </div>
            </div>
            <p> We can also write it in the following manner.</p>
            <div style="width:800px; background-color:#FC0">
              <div> SELECT<em> <strong>C1.</strong>Accountno, <strong>C1.</strong>Company, <strong>C1.</strong>Contact</em>, <strong>C2.</strong>Lastconton<br />
                FROM <em>Contact1 <strong>C1</strong>, Contact2 <strong>C2</strong>, Cal<br />
                  </em>WHERE <strong>C1.</strong>Accountno=<strong>C2.</strong>Accountno and <strong>C1.</strong>Accountno=<strong>Cal.</strong>Accountno and <strong>Cal.</strong>Rectype='S'<br />
                ORDER BY <strong>C2.</strong>Lastconton <br />
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseEleven">
          <h4 class="panel-title"> #11
            Summarizing and Grouping Data</h4>
        </a> </div>
        <div id="collapseEleven" class="panel-collapse collapse">
          <div class="panel-body">
            <h3>Aggregate Functions</h3>
            <p> SQL aggregate functions return a single value, calculated from values in a column.</p>
            <p>Useful aggregate functions:</p>
            <ul>
              <li>AVG() - Returns the average value</li>
              <li>COUNT() - Returns the number of rows</li>
              <li>FIRST() - Returns the first value</li>
              <li>LAST() - Returns the last value</li>
              <li>MAX() - Returns the largest value</li>
              <li>MIN() - Returns the smallest value</li>
              <li>SUM() - Returns the sum</li>
            </ul>
            <p style="line-height:1.5">Let's assume you want to find the total number of sales for the last quarter or the total number of completed calls made last month. </p>
            <p>Here is how they work in a SQL Query:</p>
            <p><strong>Show how many completed sales there were for Qrtr 1 2014</strong>?</p>
            <div style="width:550px; background-color:#FC0">
              <div> SELECT<em> <strong>count(*)</strong></em><br />
                FROM <em>Conthist<br />
                  </em>WHERE rectype = 'S' and ondate between '1/1/2014' and '3/31/2014'<br />
              </div>
            </div>
            <p><strong>How many completed calls there were last month?</strong></p>
            <div style="width:550px; background-color:#FC0">
              <div> SELECT<em> <strong>count(*)</strong></em><br />
                FROM <em>Conthist<br />
                  </em>WHERE rectype = 'C' and ondate between '2/1/2014' and '3/1/2014'<br />
              </div>
            </div>
            <p><strong>How many companies in the database are in the Manufacturing industry?</strong></p>
            <div style="width:550px; background-color:#FC0">
              <div> SELECT<em> <strong>count(*)</strong></em><br />
                FROM <em>Contact<br />
                  </em>WHERE Key4 = 'Manufacturing'<br />
              </div>
            </div>
            <h3>GROUP BY</h3>
            <p>The GROUP BY statement is used in conjunction with the aggregate functions to group the result-set by one or more columns.</p>
            <div style="width:550px; background-color:#FC0">
              <div>SELECT column_name, aggregate_function(column_name)<br />
                FROM table_name<br />
                WHERE column_name operator value<br />
                GROUP BY column_name<br />
              </div>
            </div>
            <p><strong>Example: Show all the different Industries in the database and how many Records there are with that Industry.</strong></p>
            <div style="width:350px; background-color:#FC0">
              <div>SELECT  C1.Key4, Count(C1.Key4)<br />
                FROM Contact1 C1<br />
                GROUP BY C1.Key4<br />
              </div>
            </div>
            <h3>The HAVING Clause</h3>
            <p>The HAVING clause was added to SQL because the WHERE keyword can not be used with aggregate functions. </p>
            <p><strong>Example: Show records where the contact name is duplicated in the database (has count &gt; 1) and show how many times it is duplicated.</strong></p>
            <div style="width:350px; background-color:#FC0">
              <div>SELECT  C1.Contact, Count(Contact)<br />
                FROM Contact1 C1<br />
                GROUP BY C1.Contact<br />
                HAVING Count(Contact) &gt;  1 <br />
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwelve">
          <h4 class="panel-title"> #12 Subqueries, Unions &amp; Using Multiple Instances of the Same Database Table</h4>
        </a> </div>
        <div id="collapseTwelve" class="panel-collapse collapse">
          <div class="panel-body">
            <h2>SubQueries</h2>
            <p style="line-height:1.5">Subqueries are queries within queries. A subquery can be used anywhere an expression is allowed. A subquery is also called an inner query or inner select, while the  statement containing a subquery is also called an outer query or outer  select.      
              Lets start by  displaying a list of everyone that has had a completed call so far this year.</p>
            <div style="width:750px; background-color:#FC0">
              <div> SELECT  C1.Accountno, C1.Contact<br />
                FROM Contact1 C1, Conthist Ch<br />
                WHERE Ch.Ondate &gt;= '1/1/2014'
                and Ch.Srectype = 'C' and C1.Accountno=Ch.accountno<br />
              </div>
            </div>
            <p style="line-height:1.5">If you run this query, it is possible that you might have the same contact show up multiple times, if you have in fact had multuple completed calls for that contact<br />
              You may not want to see them listed multiple times in your list, just once is enough. <strong>This is a great example of where a subquery is needed!</strong></p>
            <div style="width:750px; background-color:#FC0">
              <div> SELECT  C1.Accountno, C1.Contact<br />
                FROM Contact1 C1<br />
                Where C1.Accountno<strong> IN</strong><br />
                (select Ch.Accountno from Conthist Ch where Ch.Ondate &gt;= '1/1/2014' and Ch.Srectype = 'C')<br />
                ORDER BY C1.Contact <br />
              </div>
            </div>
            <p>Now what if we wanted to display all the Contacts WITH NO Completed Call?</p>
            <div style="width:750px; background-color:#FC0">
              <div> SELECT  C1.Accountno, C1.Contact<br />
                FROM Contact1 C1<br />
                Where C1.Accountno <strong>NOT IN</strong> <br />
                (select Ch.Accountno from Conthist Ch where Ch.Ondate &gt;= '1/1/2014' and Ch.Srectype = 'C')<br />
                ORDER BY C1.Contact <br />
              </div>
            </div>
            <h2>The SQL UNION Operator</h2>
            <p style="line-height:1.5">The UNION operator is used to combine the result-set of two or more SELECT   statements.Notice that each SELECT statement within the UNION must have the same number   of columns. The columns must also have similar data types. Also, the columns in   each SELECT statement must be in the same order.</p>
            <h3>SQL UNION Syntax</h3>
            <div style="width: 350px; background-color: #CC0">
              <div>SELECT <em>column_name(s)</em> FROM <em>table1</em><br />
                UNION<br />
                SELECT <em>column_name(s)</em> FROM <em>table2</em><br />
              </div>
            </div>
            <p><strong>Note:</strong> The UNION operator selects only distinct values by default.      To   allow duplicate values, use the ALL keyword with UNION.</p>
            <div style="width: 350px; background-color: #CC0">
              <div>SELECT <em>column_name(s)</em> FROM <em>table1</em><br />
                UNION ALL<br />
                SELECT <em>column_name(s)</em> FROM <em>table2</em><br />
              </div>
            </div>
            <p><strong>Example: Let's say we wanted to get a list of all Primary and Secondary Contacts in one list.</strong></p>
            <p>Primary Contacts are in Contact1 and Additional/Secondary Contacts are in Contsupp with a Rectype of C<br />
            </p>
            <div style="width:950px; background-color:#FC0">
              <div>SELECT  c1.accountno, c1.company, c1.contact, 'Primary', c1.address1, c1.address2, c1.city, c1.state, c1.zip<br />
                FROM Contact1 c1<br />
                <strong>UNION</strong><br />
                SELECT CS.accountno, CAST(C1.company AS char(40)), CAST(CS.contact AS char(40)), 'Secondary', CAST(CS.address1 AS char(40)), CAST(CS.address2 AS char(40)), CAST(CS.city AS char(30)), CAST(CS.state AS char(20)),CAST(CS.zip AS char(10))<br />
                FROM Contact1 C1<br />
                INNER JOIN Contsupp CS <br />
                ON C1.accountno=CS.accountno<br />
                WHERE Rectype='C'<br />
              </div>
            </div>
            <h2>Referencing The Same Table Many Times</h2>
            <p style="line-height:1.5">If we want to generate a list of every additional contact and also display their associated email addresses we know that additional contacts are stored in the Contsupp database table with a rectype of 'C' and Email Addresses are also stored in the Contsupp database table with a rectype of 'P' and where the Contact field is equal to 'E-mail Address' and each Additional Contact is associated to its email via the recid of the additional contact and linkacct of the email address. One last thing to point out is that the Email address if longer then 30 characters is also added to the Address1 field, so the email is in both the Contsupref and Address1 fields in the Contsupp table. </p>
            <p>Here is the query:</p>
            <div style="width:950px; background-color:#FC0">
              <div>select c1.accountno, c1.company, ac.contact, ac.state, em.contsupref+em.address1 as Email<br />
                from contact1 c1 <br />
                left outer join contsupp ac on c1.accountno=ac.accountno <br />
                left outer join contsupp em on ac.recid=em.linkacct <br />
                where ac.rectype='C' and em.contact='E-Mail Address' and em.rectype='P'<br />
              </div>
            </div>
            <p style="line-height:1.5">As you can see in the above query we reference Contsupp as AC for (Additonal Contact) and also as EM for (Email), doing this allows us to reference<br />
              one table as two (2) seperate tables. </p>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseFourteen">
          <h4 class="panel-title"> #13     SQL Functions</h4>
        </a> </div>
        <div id="collapseFourteen" class="panel-collapse collapse">
          <div class="panel-body">
            <p style="line-height:1.5">SQL has many built-in functions for performing calculations on data. It allows us to manipulate the data/input value and output a new value. The following  are some most commonly used SQL functions:</p>
            <table width="818" border="0" cellspacing="3" cellpadding="3" style="font-size:13px">
              <tr>
                <td width="114" height="35" bgcolor="#FFFF99"><strong>Substring()</strong></td>
                <td width="408" bgcolor="#FFFF99">Extracts characters from within a string starting at character position X and moving X character positions to the right.</td>
                <td width="266" bgcolor="#FFFF99">Substring(Zip,2,1)</td>
              </tr>
              <tr>
                <td bgcolor="#CCCCCC"><strong>LTRIM()</strong></td>
                <td bgcolor="#CCCCCC">Trims empty space from the left of a string</td>
                <td bgcolor="#CCCCCC">LTrim(Contact)</td>
              </tr>
              <tr>
                <td bgcolor="#FFFF99"><strong>RTRIM()</strong></td>
                <td bgcolor="#FFFF99">Trims empty space from the right of a string</td>
                <td bgcolor="#FFFF99">RTrim(Address1)</td>
              </tr>
              <tr>
                <td bgcolor="#CCCCCC"><strong>LEFT()</strong></td>
                <td bgcolor="#CCCCCC">Extracts character from the  string starting from the left</td>
                <td bgcolor="#CCCCCC">Left(Company, 10)</td>
              </tr>
              <tr>
                <td bgcolor="#FFFF99"><strong>RIGHT()</strong></td>
                <td bgcolor="#FFFF99">Extracts characters from the string starting from the right</td>
                <td bgcolor="#FFFF99">Right(Company, 5)</td>
              </tr>
              <tr>
                <td bgcolor="#CCCCCC"><strong>UPPER()</strong></td>
                <td bgcolor="#CCCCCC">Converts all characters in a string to UPPER case</td>
                <td bgcolor="#CCCCCC">Upper(Title)</td>
              </tr>
              <tr>
                <td bgcolor="#FFFF99"><strong>LOWER ()</strong></td>
                <td bgcolor="#FFFF99">Converst all characters in a string to LOWER case</td>
                <td bgcolor="#FFFF99">Lower(Department)</td>
              </tr>
              <tr>
                <td bgcolor="#CCCCCC"><strong>GetDate()</strong></td>
                <td bgcolor="#CCCCCC">Returns the current date and time</td>
                <td bgcolor="#CCCCCC">Getdate()</td>
              </tr>
              <tr>
                <td bgcolor="#FFFF99"><strong>DATEDIFF()</strong></td>
                <td bgcolor="#FFFF99">Returns the datepart difference between two dates.</td>
                <td bgcolor="#FFFF99">DateDiff(year, 1/5/2010, 2/2/2014)</td>
              </tr>
              <tr>
                <td height="42" bgcolor="#CCCCCC"><strong>DatePart()</strong></td>
                <td bgcolor="#CCCCCC">Returns a single part of a date/time, such as year, month, day, hour, minute, etc.</td>
                <td bgcolor="#CCCCCC">Datepart(month,3/2/2014)</td>
              </tr>
            </table>
            <br>
            <p>GetDate() and DateDiff() are very helpful for when finding records that were created, completed, updated either today, yesterday, or within the last 2 weeks, etc.</p>
            <p><strong>The following Query, shows all contacts with a completed call this week (past 7 days).</strong><br />
            </p>
            <div style="width:730px; background-color:#FC0">
              <div>SELECT C1.Accountno, C1.Contact, Ch.Ref, Ch.ondate, Ch.rectype, Ch.srectype<br />
                FROM Contact1 C1, Conthist Ch<br />
                Where C1.Accountno=Ch.Accountno and DateDiff(d, ch.ondate, getdate()) &lt;= 7 and Ch.Srectype = 'C'          ORDER BY C1.Contact <br />
              </div>
            </div>
            <br>
            <p><strong>Show all contacts with a scheduled call   from/between last week to the end of the next week. (past 7 days and next 7 days).</strong><br />
            </p>
            <div style="width:736px; background-color:#FC0">
              <div>SELECT C1.Accountno, C1.Contact, Ca.Ref, Ca.OnDate, Ca.Rectype<br />
                FROM Contact1 C1, Cal Ca<br />
                Where C1.Accountno=Ca.Accountno and (ca.OnDate between getdate() - 7 and getdate() + 7)  and Ca.Rectype = 'C'<br />
                ORDER BY C1.Contact </div>
            </div>
            <br>
            <p><strong>What if we wanted to show all Primary Contacts with their associated Primary Email only.</strong><br />
              <br />
              <em>The primary email address is determined when the Contsupp.rectype is equal to P and Contsupp.Contact is equal to E-mail Address and when the 2nd digit of the Contsupp.Zip  is equal to 1.</em></p>
            <div style="width:850px; background-color:#FC0">
              <div>Select c1.accountno, c1.company, c1.Key1, c1.State, c1.Contact , cs.CONTSUPREF+cs.Address1 as Email,  cs.zip<br />
                FROM contsupp  cs, contact1 c1 <br />
                WHERE (cs.rectype = 'P' and cs.contact = 'E-mail Address'  and <strong>substring(cs.zip,2,1) = '1'</strong>) and c1.accountno=cs.accountno<br />
              </div>
            </div>
            <br>
            <p>We can also do the following which is a more popular way of sorting for the primary email addresses. </p>
            <div style="width:900px; background-color:#FC0">
              <div>Select c1.accountno, c1.company, c1.Key1, c1.State, c1.Contact , cs.CONTSUPREF+cs.Address1 as Email,  cs.zip<br />
                FROM Contsupp  cs, Contact1 c1 <br />
                WHERE (cs.rectype = 'P' and cs.contact = 'E-mail Address'  and <strong>cs.zip like '_1%'</strong>) and c1.accountno=cs.accountno<br />
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="panel panel-default">
        <div class="panel-heading"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseFifteen">
          <h4 class="panel-title"> #14 Useful GoldMine SQL Queries</h4>
        </a> </div>
        <div id="collapseFifteen" class="panel-collapse collapse">
          <div class="panel-body">
            <p> 1. All primary contacts located in NY, CT and NJ, sorted by Company name. </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT *<br />
                FROM <em>Contact1<br />
                  WHERE State in ('NY', 'CT', 'NJ') <br>
                  ORDER BY company </em></strong> </div>
            </div>
            <p> 2. All Contacts Created Today. </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT *<br />
                FROM Contact1<br />
                WHERE createon >= getdate() - 1 </strong> </div>
            </div>
            <p> 3. All Primary Contacts that have a Primary Email Address. </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT *<br />
                FROM Contact1<br />
                WHERE Accountno IN (SELECT Accountno FROM Contsupp WHERE Contact = 'E-mail Address' and Zip LIKE '_1%') </strong> </div>
            </div>
            <p> 4. All Primary Contacts that DO NOT have a Primary Email Address. </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT *<br />
                FROM Contact1<br />
                WHERE Accountno NOT IN (SELECT Accountno FROM Contsupp WHERE Contact = 'E-mail Address' and Zip LIKE '_1%') </strong> </div>
            </div>
            <p> 5. All Primary Contacts and their associated Primary Email Address. </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>select c1.accountno, c1.contact, contsupp.address2 as Contact, isnull(contsupp.contsupref,'') + isnull(contsupp.address1,'') as Email<br>
FROM contact1 c1<br>
LEFT JOIN contsupp on c1.accountno=contsupp.accountno<br>
WHERE contsupp.rectype='P' and contsupp.contact='E-Mail Address' and substring(contsupp.zip,2,1)='1' </div>
            </div>
            <p> 6. Total Number of Primary Contact Records </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT count(*)<br />
                FROM Contact1<br />
              </strong> </div>
            </div>
            <p> 7. Total Number of Email Addresses (Primary and Secondary) </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT count(*)<br />
                FROM Contsupp<br>
                WHERE Contact = 'E-mail Address'<br />
              </strong> </div>
            </div>
            <p> 8. Total Number of Records by Contact/Record Type </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT Key1, count(Key1)<br />
                FROM Contact1<br>
                GROUP BY Key1<br />
              </strong> </div>
            </div>
            <p> 9. All Secondary Contact Records </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT *<br />
                FROM Contsupp<br>
                WHERE Rectype = 'C'<br />
              </strong> </div>
            </div>
            <p> 10. All Secondary Contacts and Their Email Addresses </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT c1.accountno, c1.company, ac.contact, isnull(em.contsupref,'') + isnull(em.address1,'') as Email<BR>
 FROM contact1 c1 <BR>
LEFT JOIN contsupp ac on c1.accountno=ac.accountno <br>
LEFT JOIN contsupp em on ac.recid=em.linkacct <br>
WHERE ac.rectype='c' and em.contact='E-Mail Address' <br>
              </strong> </div>
            </div>
            <p> 11. All Primary and Secondary Contacts </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT Accountno, Contact, Company, Phone1, 'PRIMARY CONTACT' <br />
                FROM Contact1 <br>
                UNION<br />
                SELECT cs.Accountno, cs.Contact, c1.Company, cs.Phone, 'SECONDARY CONTACT'<br>
                FROM Contact1 c1, Contsupp cs <br>
                WHERE c1.Accountno=cs.Accountno  and cs.Rectype = 'C'
                ORDER BY c1.Company </strong> </div>
            </div>
            <p> 12. History Items (Completed Activities) with a Specific Activity Code</p>
            <div style="width:100%;background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT *<br />
                FROM ContHist <br>
                WHERE Actvcode = 'TS' </strong> </div>
            </div>
            <p> 13. Completed Calls within the last 30 Days Sorted by GM User and Completion Date.</p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT *<br />
                FROM ContHist <br>
                WHERE ondate >= getdate() -30 and srectype = 'C'<br>
                ORDER BY userid, ondate </strong> </div>
            </div>
            <p> 14.Displays Contacts with Completed Calls and Appointments within the last 90 Days for a specific GM User</p>
            <div style="width:100%;background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong> SELECT c1.contact, c1.company, c1.phone1, ch.ondate, ch.ref, ch.actvcode, ch.resultcode, c1.accountno<br />
                FROM   contact1 c1<br />
                INNER JOIN conthist ch<br />
                ON     c1.accountno = ch.accountno<br />
                WHERE  ch.srectype IN ('A','C')<br />
                AND    ch.ondate >= GETDATE() - 90<br />
                AND    userid     = 'JAY' </strong> </div>
            </div>
            <p> 15. Total Number Of Completed Activities, listed by Activity Types and Grouped By User Within the last 30 days</p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong>SELECT userid, count(*) as Total, sum(case when srectype = 'C' then 1 else 0 end) as Calls, sum(case when srectype = 'A' then 1 else 0 end) as Appointments, sum(case when srectype = 'M' then 1 else 0 end) as Emails, sum(case when srectype = 'D' then 1 else 0 end) as TODOS, sum(case when srectype = 'E' then 1 else 0 end) as EVENTS, sum(case when srectype = 'O' then 1 else 0 end) as Others, sum(case when srectype = 'S' then 1 else 0 end) as Sales, sum(case when srectype = 'T' then 1 else 0 end) as Next_Actions, sum(case when srectype = 'U' then 1 else 0 end) as Unknown<br />
                FROM CONTHIST<br />
                WHERE ondate >= getdate() - 30<br />
                GROUP BY userid<br />
                ORDER BY count(*) DESC<br />
              </strong> </div>
            </div>
            <p> 16. List All Malformed Email Addresses </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong> SELECT  accountno ,cs.contsupref+cs.address1 AS 'E-Mail Address', cs.Address2 AS 'Contact'<br />
                FROM contsupp cs<br />
                WHERE  (cs.CONTACT = 'E-mail Address') <br />
                AND (SELECT <br />
                CASE <br />
                WHEN cs.contsupref+cs.address1  IS NULL <br />
                OR CHARINDEX('@.',cs.contsupref+cs.address1 ) > 0 <br />
                OR CHARINDEX('.@',cs.contsupref+cs.address1 ) > 0 <br />
                OR CHARINDEX('..',cs.contsupref+cs.address1 ) > 0 <br />
                OR CHARINDEX('"', cs.contsupref+cs.address1 ) <> 0 <br />
                OR CHARINDEX('(', cs.contsupref+cs.address1 ) <> 0 <br />
                OR CHARINDEX(')', cs.contsupref+cs.address1 ) <> 0 <br />
                OR CHARINDEX(',', cs.contsupref+cs.address1 ) <> 0 <br />
                OR CHARINDEX('<', cs.contsupref+cs.address1 ) <> 0 <br />
                OR CHARINDEX('>', cs.contsupref+cs.address1 ) <> 0 <br />
                OR CHARINDEX(';', cs.contsupref+cs.address1 ) <> 0 <br />
                OR CHARINDEX(':', cs.contsupref+cs.address1 ) <> 0 <br />
                OR CHARINDEX('[', cs.contsupref+cs.address1 ) <> 0 <br />
                OR CHARINDEX(']', cs.contsupref+cs.address1 ) <> 0 <br />
                OR RIGHT(RTRIM(cs.contsupref+cs.address1 ),1) = '.' <br />
                OR CHARINDEX(' ',LTRIM(RTRIM(cs.contsupref+cs.address1 ))) > 0 <br />
                OR LEN(cs.contsupref+cs.address1 )-1 <= CHARINDEX('.', cs.contsupref+cs.address1 ) <br />
                OR cs.contsupref+cs.address1  LIKE '%@%@%' <br />
                OR cs.contsupref+cs.address1  NOT LIKE '%@%.%' THEN 0 <br />
                ELSE 1 
                END) = 0 </strong> </div>
            </div>
            <p> 17. Search NOTES </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong> SELECT accountno, CAST(CAST(NOTE AS varbinary(MAX)) AS varchar(MAX)) AS Note<br />
                FROM Notes<br />
                WHERE CAST(CAST(NOTE AS varbinary(MAX)) AS varchar(MAX)) like '%your search string here%'<br />
              </strong> </div>
            </div>
            <p> 18. Who has emails in their TRASH </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong> SELECT mb.userid, mb.folder, count(*)<br>
                FROM  mailbox mb<br>
                WHERE  mb.folder in ( 'X-GM-TRASH')<br>
                GROUP BY  mb.userid ,mb.folder <br>
                ORDER BY  mb.userid ,mb.folder </strong> </div>
            </div>
            <p> 19. Contacts with more than 1 Email Marked as Primary </p>
            <div style="width:100%; background-color:#FC0; padding:5px; margin:10px;">
              <div> <strong> SELECT cs1.accountno, cs1.contact, cs1.zip, cs1.contsupref + isnull(cs1.address1,'') as email, cs1.recid<br>
                FROM contsupp cs1<br>
                JOIN<br>
                ( SELECT cs.accountno, count(accountno) as reccount<br>
                FROM contsupp cs<br>
                WHERE cs.zip like '_1%' and cs.rectype='P' and cs.contact='E-Mail Address'<br>
                GROUP BY accountno HAVING count(accountno) > 1 ) as e on cs1.accountno=e.accountno<br>
                WHERE cs1.zip like '_1%' and cs1.rectype='P' and cs1.contact='E-Mail Address'<br>
                ORDER BY cs1.accountno </strong> </div>
            </div>
          </div>
        </div>
      </div>
    </div></td>
  </tr>
</table>
  <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>

