Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Export Email Addresses using an SQL Query

Status
Not open for further replies.

ZoeVent

Technical User
Mar 4, 2013
4
GB
I am using Goldmine 7.0 Corporate Edition and need to export our database to include the email addresses.
I understand I need to use an SQL Query but I can't seem to insert the correct condition.
Please help
thank you
 
hi,

What code do you have so far?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
SELECT C1.* FROM GM_VENT_DOM.DBO.CONTACT1 C1 JOIN (SELECT DISTINCT ACCOUNTNO FROM GM_VENT_DOM.DBO.CONTSUPP WHERE (CONTSUPP.RECTYPE = 'P' AND CONTSUPP.CONTACT = 'E-mail Address')) CS ON CS.AccountNo = C1.AccountNo WHERE (C1.Key3 = 'SE' OR C1.Key2 = '7. Work Complete') ORDER BY C1.CONTACT

this is the code i have been using, with no joy and lots of frustration, grrr
 
How about something like this...
Code:
SELECT C1.* 

FROM 
 GM_VENT_DOM.DBO.CONTACT1 C1 inner JOIN 
 GM_VENT_DOM.DBO.CONTSUPP cs
   ON CS.AccountNo = C1.AccountNo 

WHERE (C1.Key3 = 'SE' OR C1.Key2 = '7. Work Complete') 
  and cs.RECTYPE = 'P'
  AND cs.CONTACT = 'E-mail Address'

ORDER BY C1.CONTACT


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
thank you. I have run the query with the above code but i'm presented with the following Database Error:
Line 1: Incorrect syntax near 'E-mail Address'.

??????
 
Please COPY the code that you have run and PASTE it into a post without making any changes.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Thank you for this but it's still not drawing in the email address and providing me the previous error message.
I have found a previous code which brings in the email addresses:
select contact1.accountno, contact1.createon, contact1.company, contact1.address2, contact1.address3, contact1.city, contact1.state, contact1.country, contact1.key1, contact1.key2, contact1.mergecodes, contact1.contact, contact1.address1, contact1.zip, contact1.key3, contsupp.contsupref from contact1 join contsupp on contsupp.accountno=contact1.accountno where contsupp.contact = 'E-mail Address'
but, I also need to draw in the invoice date from all columns!!
Any further help you can give me would be fantastic.
thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top