Salesforce Querying

Biggest Gotchas in SOQL (coming from a SQL background), along with a little commentary for each.

No Select * -> Dang! I now have to know what fields I want to query for.

No Inner/Outer Joins -> What in the world?!

. Notations (but with no joins) -> Confused!

Nested Queries (again with no joins) -> More Confused!

Plural Table Names -> The singular version just ain’t good enough, huh?

Plural Table Names and __r -> That’s it, no more querying!

Honorable mentions:

Includes/Excludes On Picklists

Date Literals (much more than SYSDATE, TO_DATE)

I’m sure I’m missing some…

Maybe you too feel (or have previously felt) my agony.

Or maybe if SOQL is your 1st time dealing with querying, this all makes perfect sense to you.

Related Posts