Microsoft CRM 3.0 Experiences

Wednesday, June 27, 2007

MS CRM SQL Query - Accounts with no Contacts

select accountid, name, address1_city, statecode
from filteredaccount a
where not exists (select accountid from filteredcontact c where c.accountid = a.accountid and statecode=0)
and statecode = 0 order by name

0 Comments:

Post a Comment

<< Home