Thursday, November 7, 2013

Script to delete XML Templates

Your Ad Here

DECLARE
   p_template_code   xdo_templates_b.template_code%TYPE
                        := 'PRNT_XXX_YYY';
BEGIN
   DELETE FROM xdo_templates_b
         WHERE template_code = p_template_code;

   DELETE FROM xdo_templates_tl
         WHERE template_code = p_template_code;

   DELETE FROM xdo_lobs
         WHERE lob_code = p_template_code;

   COMMIT;
   DBMS_OUTPUT.put_line ('Total Rows Deleted ' || SQL%ROWCOUNT);
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line ('Error ' || SQLERRM);
END;
Your Ad Here

0 comments:

Post a Comment