We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [where]

The syntax of the condition expression in a WHERE clause of a SOQL query includes one or more field expressions. You can specify multiple field expressions to a condition expression by using logical operators.

Filter by
Sorted by
Tagged with
4
votes
1answer
39 views

SOQL Count of non-blank multi-select fields

I'm trying to find out how many people answered a multi-select question in a survey. For this count I do not need to know what they picked, simply that they picked something (or didn't not pick ...
1
vote
2answers
43 views

Unable to use Less-than/greater-than with Datetime in SOQL condition

I am unable to use a Datetime field in a SOQL query: SELECT Status FROM Campaign WHERE LastModifiedDate >= Last_Sync__c; I have a workaround where I create a checkbox formula field which is true ...
0
votes
1answer
88 views

Jsforce where clause having multiple conditions not working

This below code results in INVALID_FIELD: Test' AND ParentId = null AND EndDate > '2019-05-21' LIMIT 1 error.. How can I add more than one condition in where clasue? const a = 2019-01-03 const b = ...
7
votes
2answers
373 views

SOQL: Populate a Literal List in WHERE IN Clause

I need to query for an object based on 2 string variables. The first one is a constant but the second one gets passed to the class constructor. So in the end I want to achieve something like this: ...
0
votes
2answers
41 views

SOQL WHERE IN query

Which of these is better: object__c[] objects = [SELECT name FROM object__c WHERE opportunity__c IN (SELECT OpportunityId From OpportunityLineItem WHERE Product2.Family = 'My Item')]; or: ...
0
votes
1answer
499 views

Datetime in WHERE clause

I am facing issue with Datetime column in WHERE clause. Below two queries are giving different counts. SELECT COUNT(CallTime_c) FROM SF...TableName WHERE CallDateTime > '09-13-2018 09:01:00' and ...
2
votes
3answers
108 views

Check field's data availability in WHERE clause

Can we make a check on WHERE clause of a SOQL query for comparing 2 date fields availability? My requirement is, I want to get the response from query based on data availability on two different ...
0
votes
3answers
203 views

SOQL - Use the size of the list of inner child query in the WHERE clause

I was trying something like along those lines but it's not working: SELECT Id ( SELECT Id FROM Orders WHERE Custom_Field__c = '...