Is there anything I can do in SOQL to achieve the same as WHERE 1=1 in regular SQL engines? I've tried that, and WHERE TRUE=TRUE, but it's rejected.
Thanks!
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityAll filters are in the form of "field operator value", so the closest approximation would be something like WHERE Id <> NULL
, which should be true for most, if not all, objects.
You could also do (for most objects)
WHERE CreatedDate < TOMORROW returns all objects
WHERE CreatedDate > TOMORROW returns no objects