Accounts can be associated to its Parent so by default all Accounts created are stand alone or "child", this is for standard SF functionality. You can use the following to find standalone accounts having a parent or missing (with some tweak) Select a.Id,a.ParentId, a.AccountNumber From Account a where a.ParentId <> null limit 100
You can use the following to find standalone accounts having a parent or missing (with some tweak)
Select a.Id,a.ParentId, a.AccountNumber From Account a where a.ParentId <> null limit 100
I have two account records types "A" AND "B"
Accounts whose record type "A" will always be parent of Accounts with record type "B"
I'm trying to get a report or a data dump of all the Accounts whose record type is "A" and are NOT listed as parent of Accounts with record type B
Thanks
SELECT Id, Name FROM Account WHERE ParentId = null and
Id NOT IN (SELECT ParentId FROM Account)