locked
CRM 2011 : Phonecalls with missing recipient RRS feed

  • Question

  • Hi

    I need help with SQL query for getting list of phonecalls which do not have a recipient assigned.

    Its a mandatory field on phonecalls, but for some reason I found few records which do not have a recipient.

    Thanks

    Wednesday, February 5, 2014 6:16 AM

Answers

  • Try something like this

    select	* 
    from	FilteredPhoneCall pc left outer join FilteredActivityParty ap 
    		on (pc.activityid = ap.activityid and ap.participationtypemaskname = 'To Recipient')
    where	ap.activityid is null


    Eric UNG [Senior Analyst Programmer :: Sydney, Australia]

    • Marked as answer by CRMDevlpr Wednesday, February 5, 2014 8:02 AM
    Wednesday, February 5, 2014 6:34 AM

All replies

  • Try something like this

    select	* 
    from	FilteredPhoneCall pc left outer join FilteredActivityParty ap 
    		on (pc.activityid = ap.activityid and ap.participationtypemaskname = 'To Recipient')
    where	ap.activityid is null


    Eric UNG [Senior Analyst Programmer :: Sydney, Australia]

    • Marked as answer by CRMDevlpr Wednesday, February 5, 2014 8:02 AM
    Wednesday, February 5, 2014 6:34 AM
  • Thanks Eric

    Wednesday, February 5, 2014 8:03 AM