You need to sign in to do that
Don't have an account?
Darla.ax69
Query for null parent ID
Hello,
I need to query for all accounts without a parent ID. I tried this query:
select Id from Account where ParentId = null
And there are no results. I'm guessing maybe I have to do something different since the type of ParentId is a reference?
Any help is appreciated,
=> Darla
I need to query for all accounts without a parent ID. I tried this query:
select Id from Account where ParentId = null
And there are no results. I'm guessing maybe I have to do something different since the type of ParentId is a reference?
Any help is appreciated,
=> Darla
Select name from Account where ParentId = '000000000000000'
Foreign keys that are empty typically point to the "Empty Key".
Just a quick note to point out that
Thanks Benji!!!
Thanks.
Just another part about inconsistency... (Forgive any errors blow - I'm off the cuffing it)...
This doesn't work: Select Id, ParentId From Account Where ParentId = null
This does work: Select Id, ParentId From Account Where ParentId = '000000000000000'
This doesn't work: Select Id, RecordTypeId From Account Where RecordTypeId = '000000000000000'
This does work: Select Id, RecordTypeId From Account Where RecordTypeId = null
Thought I'd point this one out if you want to update the docs while you're at it.
Thanks