[java] LIMIT para la query

Viewer

copydownloadembedprintName: LIMIT para la query
  1. try {
  2.     List<Merchant__c> recordsToUpdate = [SELECT Id, Merchant_s_Primary_Industry__c
  3.                                          FROM Merchant__c
  4.                                          WHERE Merchant_s_Primary_Industry__c IN ('Accupuncture''Alternative Medicine''Anesthesiologist''ASC''Funeral Services''Gastroenterology''Gynecology''Hospital''Neurosurgery''Oncology''Orthopaedic Care''Other - Inactive Value''Permanent Makeup',
  5.                                          'Pharmaceuticals''Reconstructive Surgery''Remodeling''Roofing''Sexual Reassignment Surgery''Substance Abuse/Rehab''Surrogacy''Tattoo Removal''Therapy/Behavioral''Urology''Vein Treatment''Water Filtration')
  6.                                          LIMIT 100];
  7.  
  8.     for (Merchant__c record : recordsToUpdate) {
  9.         record.Merchant_s_Primary_Industry__c = 'Legacy';
  10.     }
  11.  
  12.     update recordsToUpdate;
  13. } catch (DmlException e) {
  14.     // Manejar la excepción DmlException
  15.     System.debug('Error en la operación DML: ' + e.getMessage());
  16. }
  17.  

Editor

You can edit this paste and save as new:


File Description
  • LIMIT para la query
  • Paste Code
  • 11 Dec-2023
  • 1.05 Kb
You can Share it: