[sql] Cambio de valores

Viewer

copydownloadembedprintName: Cambio de valores
  1. List<Merchant__c> recordsToUpdate = [SELECT Id, Merchant_s_Primary_Industry__c
  2.                                      FROM Merchant__c
  3.                                      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',
  4.                                      'Pharmaceuticals', 'Reconstructive Surgery', 'Remodeling', 'Roofing', 'Sexual Reassignment Surgery', 'Substance Abuse/Rehab', 'Surrogacy', 'Tattoo Removal', 'Therapy/Behavioral', 'Urology', 'Vein Treatment', 'Water Filtration')];
  5.  
  6. FOR (Merchant__c record : recordsToUpdate) {
  7.     record.Merchant_s_Primary_Industry__c = 'Legacy';
  8. }
  9.  
  10. UPDATE recordsToUpdate;

Editor

You can edit this paste and save as new:


File Description
  • Cambio de valores
  • Paste Code
  • 11 Dec-2023
  • 840 Bytes
You can Share it: