IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
 View Only
  • 1.  xml Blob update in UPDATE query issue

    Posted Tue January 04, 2011 06:59 AM

    Originally posted by: N.V.KISHORE


    Hi,

    I am trying to update a DB2 table column which is defined as blob in database using WTX 8.3, I am using the below

    *map rule which is not working *

    =VALID(DBQUERY("UPDATE TABLENAME SET INSTOBJ='"PACKAGE(XML_CARD1)"' WHERE URI_ID='1'", "CONNECTION STATEMENT.. -T"),FAIL("Failed to update"))

    DB2 error msg

    Message: IBMCLI DriverDB2 SQL0408N A value is not compatible with the data type of its assignment target.

    Could some one please help us to resolve this issue. Thanks in Advance
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: xml Blob update in UPDATE query issue

    Posted Wed January 05, 2011 06:36 AM

    Originally posted by: paul.brett


    This does NOT appear to be a WTX issue. Please review the enclosed SQL and the results shown here:
    This command did not return data, and it did not return any rows
    This command did not return data, and it did not return any rows
    Error: SQL0408N A value is not compatible with the data type of its assignment target. Target name is "STUFF". SQLSTATE=42821
    (State:22005, Native Code: FFFFFE68)
    ID STUFF
    0 Row(s) affected

    It would seem you cannot insert raw XML into a column defined as 'Blob'. It does work if the column is defined as XML.

    Hope that helps.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: xml Blob update in UPDATE query issue

    Posted Wed January 05, 2011 10:17 AM

    Originally posted by: N.V.KISHORE


    **This does NOT appear to be a WTX issue.

    Actully I tried using update key which is at card level, WTX is able to update in database as blob.
    we dont want to use above approch because it requires mdq file configuration.

    We wanted to acheive using update query in map rule,

    the bottom line is WTX package() function in update query is not able to convert the xml card1 into blob which DB2 table is expecting, is there any function which can convert the xmlcard1 to a blob?
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender