Oracle Custom Quote Operator

oracle

UPDATE qreport_params
   SET DEFAULT_VALUE =
             DEFAULT_VALUE
          || q'{objPublisher.onChange('FACILITY_LIST','updateElement([\'DEPT_SERVICE_AREA_ID\'],[\'FACILITY_LIST\'])');updateElement(['DEPT_SERVICE_AREA_ID'],['FACILITY_LIST']);}'
 WHERE     qparams_id = 49
       AND qreports_id IN (31721, 31723, 31722, 31724)
       AND DEFAULT_VALUE NOT LIKE '%DEPT_SERVICE_AREA_ID%';

In the above code, q'{ … }' is the construct. We can change the character that follows the single quote if needed. The stuff that is between { and } can be anything. Another example:

SET DEFINE OFF;

UPDATE report.qreport_multi_output_sql
   SET SQL_WHERE_STUB =
          REPLACE (SQL_WHERE_STUB,
                   q'{AND cr.users_list LIKE '%,&usersid,%'}',
                   '')
 WHERE qreports_id = 30623;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License