Activity › Forums › Salesforce® Discussions › How do we create a SOQL query in Salesforce?
-
How do we create a SOQL query in Salesforce?
Posted by Ratnesh on May 12, 2020 at 2:57 PMHow do we create a SOQL query in Salesforce?
Pooja replied 6 years ago 3 Members · 2 Replies -
2 Replies
-
To use the Query Builder to query Salesforce data
Select Tools | Query Builder | Query Builder.
Drag tables (Salesforce objects) from the Object Explorer to the Diagram pane. Existing relationships display.
Note: You cannot create new relationships when building a Salesforce SOQL query.
If a pair of tables (objects) has more than one relationship, choose one relationship and remove the others.
To add additional existing relationships, add multiple instances of a table.
To restore a dropped relationship between tables, right-click the child table and select Restore FK.
Select the columns (Salesforce fields) you want to add to the query. For more information, see Build Queries Visually.
To use a SOQL date range function, select a date column and click in the Where field for that column. Then select a date range from the Date Range tab of the Where Condition dialog.
Click Execute SQL to run the query. - [adinserter block='9']
-
Select Tools | Query Builder | Query Builder.
Drag tables (Salesforce objects) from the Object Explorer to the Diagram pane. Existing relationships display.
Note: You cannot create new relationships when building a Salesforce SOQL query.
If a pair of tables (objects) has more than one relationship, choose one relationship and remove the others.
To add additional existing relationships, add multiple instances of a table.
To restore a dropped relationship between tables, right-click the child table and select Restore FK.
Select the columns (Salesforce fields) you want to add to the query. For more information, see Build Queries Visually.
To use a SOQL date range function, select a date column and click in the Where field for that column. Then select a date range from the Date Range tab of the Where Condition dialog.
Click Execute SQL to run the query.
Log In to reply.