SQL WHERE Clause Examples for Salesforce Restores

Applies to: Record-level restore operations and seeding a sandbox

If the restore operation accepts SQL queries as filters, use the SQL WHERE clause to define the filter.

Examples

  • Restore a specific set of records by using the 18 character Salesforce ID:

    Id IN (‘001f100001W8X5hAAF’, ‘001f100001W8X5hQAE’, ‘001j000000rqIlWAQE’)
  • Restore records that were modified during a specific time range:

    LastModifiedDate <= '2019-09-14 18:09:51' and LastModifiedDate  >=  '2019-08-14 18:09:50'
  • Restore Account records that were referred by a contact. The filter is applied to the Account object.

    Id IN (select AccountId from contact where contact.FirstName = 'jon')

Loading...