Forum Stats

  • 3,853,853 Users
  • 2,264,287 Discussions
  • 7,905,483 Comments

Discussions

FDMEE - SQL Mapping Script ICP

athlon007
athlon007 Member Posts: 69 Blue Ribbon
edited Sep 13, 2019 4:57AM in Financial Data Management

Hello,

I have following issue on source data and a mapping I have done. I hope you can help me with it.

I have the source ICP coming in as below:

52100010__60052

(There are two _ _ underscores)

My mapping script is doing the following (shorted version)

CASE

     WHEN RIGHT(ICP,1) = '_' THEN ENTITYX

     WHEN RIGHT(ICP,6) = 152010 THEN '7177'

     ELSE ENTITYX

END

Now I would expect that the ELSE is going into effect, but I am gettin an error as per below:

FATAL AIF : Error in CommMap update TDATASET_T_TDATASEGW Traceback (most recent call last): File "<string>", line 1688, in update TDATASEG_T_TDATASEGW SQLDataException: java.sql.SQLDATAExceptio: [FMWGEN][SQLServer JDBC Driver][SQLServer]Conversion failed when converting the nvarchar value '_60052' to data type int.

Can anybody help me with this error? I guess the SQL script should be amended somehow?

I would appreciate any help.

Thanks alot

Roman

Tagged:
athlon007

Best Answer

  • user6692921
    user6692921 Member Posts: 179 Silver Badge
    edited Sep 12, 2019 4:11AM Answer ✓

    The error is saying that it can't convert something to an integer so I guess the problem is on this line:

    WHEN RIGHT(ICP,6) = 152010 THEN '7177'

    Change it to:

    WHEN RIGHT(ICP,6) = '152010' THEN '7177'

    athlon007athlon007

Answers