IBM Sterling Transformation Extender

Sterling Transformation Extender

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


#Sterling
#Supplychain
 View Only
  • 1.  DBLOOKUP

    Posted 04/20/16 06:46 AM

    Originally posted by: Santanu


    Hi ,

     

    I am trying to execute one DBLOOKUP as below.

    TEXTTONUMBER(VALID(DBLOOKUP("select abc_seq.nextval from dual","-mdq Database_QueryFile1.mdq -DBNAME Test -T+"),"Failed"))

    I am not getting any value of this DBLOOKUP.

    while I am executing this select statement in DB,i am getting 101 as the value of NEXTVAL.

    I am surprised why NEXTVAL type is showing as FLOAT in dbl.

    DBL

    ====

    <1808-6468>: Starting a database unload...
    <1808-6468>: Query      : select abc_seq.nextval from dual
    <1808-6468>: DBLOOKUP Function, Transaction scope: Map
    <1808-6468>: TRACE command specified, append mode, file: C:\WTX_Maps\Test\Test1.dbl
    <1808-6468>: Retrieving 1 rows per fetch.
    <1808-6468>: Statement execution succeeded.
    <1808-6468>: The columns are of the following types:
    <1808-6468>:    Column 1 (NEXTVAL) type is FLOAT, precision is 38.
    <1808-6468>: Number of buffers in fetch array = 1
    <1808-6468>: Any column can be bound
    <1808-6468>: Writing results to a buffer.
    <1808-6468>: Retrieved 1 records (10 bytes).
    <1808-6468>: The following data was returned from DBLOOKUP:


    <1808-6468>: 8|
    <1808-6468>:


    <1808-6468>: Returned status: (0) Success
    <1808-6468>: Cleaning up and closing the transaction...
    <1808-6468>: Transaction commit succeeded.

     

    Thanks in advance for any help in this regard to understand why the value is not properly.

     

    Thanks

    Santanu

     


    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: DBLOOKUP

    Posted 04/21/16 03:48 AM

    Originally posted by: paul.brett


    It looks like you're using the ODBC adapter (as that is the one that returns a float datatype here).  Native Oracle adapter will not.

    However, if you want to (or have to) use ODBC, then change your query rule to:

    TEXTTONUMBER(VALID(DBLOOKUP("select cast(abc_seq.nextval as int) from dual","-mdq Database_QueryFile1.mdq -DBNAME Test -T+"),"Failed"))

    Thank-you.

    Paul.

    Follow me on Twitter


    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 3.  Re: DBLOOKUP

    Posted 04/21/16 04:53 AM

    Originally posted by: Santanu


    Thank you so much Paul for your help and time.


    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender