[java] LIMIT para la query
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- try {
- List<Merchant__c> recordsToUpdate = [SELECT Id, Merchant_s_Primary_Industry__c
- FROM Merchant__c
- 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',
- 'Pharmaceuticals', 'Reconstructive Surgery', 'Remodeling', 'Roofing', 'Sexual Reassignment Surgery', 'Substance Abuse/Rehab', 'Surrogacy', 'Tattoo Removal', 'Therapy/Behavioral', 'Urology', 'Vein Treatment', 'Water Filtration')
- LIMIT 100];
- for (Merchant__c record : recordsToUpdate) {
- record.Merchant_s_Primary_Industry__c = 'Legacy';
- }
- update recordsToUpdate;
- } catch (DmlException e) {
- // Manejar la excepción DmlException
- System.debug('Error en la operación DML: ' + e.getMessage());
- }
Editor
You can edit this paste and save as new: