Use SQL queries to get answers from GoldMine
Type: MSSQL
Description: This uses the ISNULL function to correctly bring back emails that fit inside contsupp.contsupref and the longer ones that spill over in to contsupp.address1
Type: MSSQL
Description: Find Primary Email Addresses for State and Contact Type LIKE (type in whole or partial words between the percent signs)
Type: MSSQL
Description: Find Malformed Email Addresses
NOTE: Because this query is looking for special characters it doesn’t display properly in a web page - please cut and paste the text of the query from here: Find Malformed Email Addresses
SELECT
accountno
,cs.contsupref AS 'E-Mail Address'
FROM
contsupp cs
WHERE
(cs.CONTACT = 'E-mail Address')
AND (SELECT
CASE
WHEN cs.contsupref IS NULL
OR CHARINDEX('@.',cs.contsupref) > 0
OR CHARINDEX('.@',cs.contsupref) > 0
OR CHARINDEX('..',cs.contsupref) > 0
OR CHARINDEX('"', cs.contsupref) <> 0
OR CHARINDEX(’(', cs.contsupref) <> 0
OR CHARINDEX(’)', cs.contsupref) <> 0
OR CHARINDEX(’,', cs.contsupref) <> 0
OR CHARINDEX(’< ', cs.contsupref) <> 0
OR CHARINDEX(’>', cs.contsupref) <> 0
OR CHARINDEX(’;', cs.contsupref) <> 0
OR CHARINDEX(’:', cs.contsupref) <> 0
OR CHARINDEX(’[', cs.contsupref) <> 0
OR CHARINDEX(’]', cs.contsupref) <> 0
OR RIGHT(RTRIM(cs.contsupref),1) = ‘.’
OR CHARINDEX(’ ‘,LTRIM(RTRIM(cs.contsupref))) > 0
OR LEN(cs.contsupref)-1 < = CHARINDEX('.', cs.contsupref)
OR cs.contsupref LIKE '%@%@%'
OR cs.contsupref NOT LIKE '%@%.%' THEN 0
ELSE 1
END) = 0
Type: MSSQL
Description: Find all contacts sent a certain attachment
Type: MSSQL
Description: This query returns email records for a contact that have keywords in the body of the email. In the example below we are looking for emails that contain the words “Subscription”, “Offering”, “Document ” or “Documents “. Notice the trailing space after the document and documents examples.
Categories: Contact, Email
Description: This returns all emails for a mergecode specified in the WHERE portion of the query between the percent signs for both primary and additional contact email addresses.
Type: MS SQL
Categories: Contact, Email
Description: This returns contact information along with the primary email address for those contacts that have a value in the email mergecode which is specified in the WHERE portion of the query at cs.mergecodes LIKE ‘%Put mergecode between these percent signs%’. The % sign allows you to search of that value anywhere in the mergecode field.
Description: This query returns main contact, userdefined field and primary email address from contsupp for key1 (Contact Type) equals ‘Customer’
21 queries. 0.426 seconds