Results 1 to 3 of 3

Thread: SQL query for contact emails in Zucker Reports

  1. #1
    nvdp2002 is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    134

    Default SQL query for contact emails in Zucker Reports

    Version 5.0.0f (Build 3338)
    MSSQL express 2005
    Windows 2003 server

    Hi ive been trying to run a sequel query in zucker to retrieve the email addressess next to contact names. I just can’t seem to find the link though.

    If anyone can help it would be much appreciated

    Thank you,
    Nasser

  2. #2
    nvdp2002 is offline Sugar Community Member
    Join Date
    Mar 2008
    Posts
    134

    Default Re: SQL query for contact emails in Zucker Reports

    any one who knows the database structure should be able to help with this

  3. #3
    jbmdn is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    39

    Default Re: SQL query for contact emails in Zucker Reports

    Maybe this helps:
    Code:
    SELECT distinct c.last_name, c.first_name, e.email_address, a.name as copmpany_name
    FROM contacts c LEFT JOIN (accounts_contacts ac, accounts a, email_addr_bean_rel erel, email_addresses e)
         ON (ac.contact_id=c.id AND ac.account_id=a.id AND erel.bean_id=c.id AND e.id=erel.email_address_id)
    where c.deleted=0
    group by c.id
    order by c.last_name
    best regards,
    jbmdn

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Zucker Reports - Account_ID SQL query
    By ngoha in forum Help
    Replies: 6
    Last Post: 2008-08-07, 04:28 PM
  2. Zucker Reports - "no access" message
    By fibbert in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2008-05-01, 04:37 AM
  3. Replies: 1
    Last Post: 2008-02-22, 04:25 PM
  4. Emails table query slowness
    By rgodoy in forum Help
    Replies: 1
    Last Post: 2007-04-03, 08:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •