DB2 Update Statement in a change set generating error

Hello,

I have an update statement in an XML changeset, I am getting parse error while deploying this code, have anyone encountered this type of error? I have several changesets in this xml changelog file, if I take out this changeset everyting deploys fine, as soon as I introduce this changeset I get the error.

 

Liquibase update Failed: Error parsing line 247 column 65 of c:/2013_Q3_01/Datab
ase/Misc/DimInitScript.xml: The content of elements must consist of well-formed
character data or markup.

 

Change set:

 


        Script to Update Fid Legal name

   
 BEGIN
  
  Update reportmart.FID mf set (FID_NAME_DBA,FID_NAME_LEGAL, FED_TAX_NUMBER,CN_TAX_ID, ADDRESS_LINE_1, ADDRESS_LINE_2, ADDRESS_LINE_3, ADDRESS_CITY,
      ADDRESS_ZIP, ADDRESS_ZIP_4, SS_REGION_ID, SS_COUNTRY_ID,SUB_GROUP_CODE )=
   (Select sf.ALT_NAME,sf.TAX_LEGAL_ENTITY_NAME,sf.FEDERAL_ID,sf.CN_TAX_ID, sf.ADDR1, sf.ADDR2, sf.ADDR3, sf.addr_CITY,sf.addr_zip,sf.zip_4, sf.REGION_ID,  sf.COUNTRY_ID,
    sf.SUBGROUP_ID
    FROM
    (Select tle1.ALT_NAME,tle1.TAX_LEGAL_ENTITY_NAME,tle1.FEDERAL_ID, tle1.CN_TAX_ID, tle1.ADDR1, tle1.ADDR2, tle1.ADDR3, tle1.CITY as addr_city,
     TRIM(SUBSTR(tle1.POSTAL_CODE,1,5)) as addr_zip,TRIM(SUBSTR(tle1.POSTAL_CODE,Length(tle1.POSTAL_CODE)-3,4)) as zip_4,
     tle1.REGION_ID,  tle1.COUNTRY_ID,tle1.SUBGROUP_ID,tle1.prt_Co_id, tle1.Fid_id
    FROM db2.Tax_Legal_entity tle1
      WHERE  tle1.Report_Type = TRIM(‘ANNUAL’)  and tle1.fid_id<>0 and tle1.SUBGROUP_ID is NOT NULL
     UNION
     Select tle.ALT_NAME,tle.TAX_LEGAL_ENTITY_NAME,tle.FEDERAL_ID, tle.CN_TAX_ID, tle.ADDR1, tle.ADDR2, tle.ADDR3, tle.CITY as addr_City,
     TRIM(SUBSTR(tle.POSTAL_CODE,1,5)) as addr_zip,TRIM(SUBSTR(tle.POSTAL_CODE,Length(tle.POSTAL_CODE)-3,4)) as zip_4,
     tle.REGION_ID,  tle.COUNTRY_ID,SUBGROUP_ID,tle.prt_Co_id, tle.Fid_id
     FROM db2.Tax_Legal_entity tle
     WHERE  tle.PRT_CO_ID > 1 and tle.Report_Type = TRIM(‘ANNUAL’) and tle.fid_id<>0)sf
    WHERE sf.PRT_CO_ID=mf.GROUP_ID and sf.Fid_Id=mf.ss_FID_Id )
  WHERE mf.fid_Key > 0;

 END
   

 

It is an XML parsing issue sinc eyou are using < and > tags inside your tag. The easiest approach is to wrap the whole body in a CDATA block.


Nathan