function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sam SalterSam Salter 

Using joins in a dataloader export and SOQL syntax help

I have a specifc query I would like to export and I am a complete novice to SOQL syntax.

What I need is all instances of an object that does not have attached to them a PDF that follows the format [Name] & ‘.pdf’

Given the structure of these in salesforce, if I was to achieve this in SQL Server I would do the below:
SELECT
      Object.id
      Object.Name
FROM Object
LEFT JOIN
      (SELECT
            Attachments.ParentID
      FROM Attachments
      INNER JOIN Object ON
            Attachments.ParentID = Object.ID
      WHERE Attachments.Name = Object.Name + '.pdf') AS PDF ON
            PDF.ParentID = Object.id
WHERE PDF.ParentID is null

Is this possible through the data loader in any way?

Thanks
 
SalesFORCE_enFORCErSalesFORCE_enFORCEr
You can't write inner queries or joins in Dataloader. You have to write individual queries and then play with the data in excel.
Abhijeet Anand 6Abhijeet Anand 6
Give it a try with salesforce workbench.