This discussion is archived
8 Replies Latest reply: Jul 25, 2013 7:18 AM by Peter vd Zwan RSS

is there any way to get the result with one line space, also end with semi column for each line?. Thanks!

Erhan_toronto Newbie
Currently Being Moderated

When I run this query:

 

select REGEXP_REPLACE(dbms_metadata_diff.compare_alter('TABLE','TBL_A','TBL_A','','USER2'),('USER1...'),'', 1, 0, 'i') from dual

 

result:

 

ALTER TABLE "TBL_A" ADD ("FIELD_A6" NUMBER(2,0) NOT NULL ENABLE)

  ALTER TABLE "TBL_A" DROP ("FIELD_A3")

  ALTER TABLE "TBL_A" MODIFY ("FIELD_A2" VARCHAR2(20))

  ALTER TABLE "TBL_A" MODIFY ("FIELD_A4" NUMBER(5,2))

  ALTER TABLE "TBL_A" MODIFY ("FIELD_A4" NOT NULL ENABLE)

  ALTER TABLE "TBL_A" MODIFY ("FIELD_A5" NULL)

 

is there any way to get the result with one line break also end with semi column for each line?:

 

ALTER TABLE "TBL_A" ADD ("FIELD_A6" NUMBER(2,0) NOT NULL ENABLE):

  ALTER TABLE "TBL_A" DROP ("FIELD_A3"):

  ALTER TABLE "TBL_A" MODIFY ("FIELD_A2" VARCHAR2(20));

  ALTER TABLE "TBL_A" MODIFY ("FIELD_A4" NUMBER(5,2));

  ALTER TABLE "TBL_A" MODIFY ("FIELD_A4" NOT NULL ENABLE);

  ALTER TABLE "TBL_A" MODIFY ("FIELD_A5" NULL);

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points