SQL code to get phone number, email address, from On Account Tracking Report?

Hi! I'm trying to write an On Account Tracking report, but I'm having a serious problem with duplication. I'm getting one row for each unique customer/phone number/email combination. Any suggestions or ideas? Thanks! :)

Parents
  • A customer can have multiple phone numbers and email addresses, so you will want to have a strategy for choosing one for each customer.  For email address there should be a "primary" flag that you can leverage (although you may also need assess the email type, depending on how you have that set up).  Phones are unfortunately a lot harder, but you can try [dbo].[FT_GET_PHONES].  For email there is [dbo].[FT_GET_PRIMARY_EADDRESS].  I should warn that there is a definite performance cost for using these functions.

Reply
  • A customer can have multiple phone numbers and email addresses, so you will want to have a strategy for choosing one for each customer.  For email address there should be a "primary" flag that you can leverage (although you may also need assess the email type, depending on how you have that set up).  Phones are unfortunately a lot harder, but you can try [dbo].[FT_GET_PHONES].  For email there is [dbo].[FT_GET_PRIMARY_EADDRESS].  I should warn that there is a definite performance cost for using these functions.

Children
No Data