Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, July 8, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Administration Forums - General Administration
Forum to discuss general administration topics for SalesLogix (including LAN & remote topics). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to General Administration | New ThreadView:  Search:  
 Author  Thread: Create query to show accounts with no contacts
SLX_Novice
Posts: 246
 
Create query to show accounts with no contactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 07 11:10 AM
fiogf49gjkf0d
Hi all.

I want to create a query that displays accounts with no contacts. I tried doing:

Contactid does not contain data, but that resulted in nothing and I know of accounts with no contacts.

How can I get this to work?

Thank you in advance.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Create query to show accounts with no contactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 07 12:41 PM
fiogf49gjkf0d
These steps will allow you to create a group of all accounts with no contacts.

1) Create an account group named "No Contacts"
2) Add condition on ACCOUNTID
3) Select "IN" as the operator
4) Enter the following in the "Value" box: select accountid from contact
5) After saving the condition, right-click it and select "NOT".

This group should now return all accounts with no contacts.
[Reply][Quote]
SLX_Novice
Posts: 246
 
Re: Create query to show accounts with no contactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 07 3:57 PM
fiogf49gjkf0d
Ryan,

I tried doing that and it gave me no results.
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Create query to show accounts with no contactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 07 4:52 PM
fiogf49gjkf0d
There is an Integrity Checker entry called "Contacts with no Account (Delete)" that proceeds to delete any contacts not belonging to an account. The (simplified) SQL it uses is:

select * from contact where not exists (select accountid from account where contact.accountid = account.accountid)

This is identical to what Ryan posted except that contact and account tables are switched and where not IN is where not EXISTS. Where not IN doesn't parse in Admin's Execute SQL. The group I created following Ryan's method does return the same records I got from Execute SQL, though. Perhaps you don't have any Accounts with no contacts? They could be a contact with a valid contactid but with a First and Lastname of "" (showing up as blank). We've accumulated a lot of those over the years.
[Reply][Quote]
SLX_Novice
Posts: 246
 
Re: Create query to show accounts with no contactsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 May 07 8:38 AM
fiogf49gjkf0d
It worked.

Thanks for all the help!
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/8/2025 8:19:56 PM