Why am I getting a “[SQL0802] Data conversion of data mapping error” exception?

后端 未结 4 1169
[愿得一人]
[愿得一人] 2020-12-07 01:47

I am not very familiar with iseries/DB2. However, I work on a website that uses it as its primary database.

A new column was recently added to an existing table. Whe

4条回答
  •  抹茶落季
    2020-12-07 02:10

    I was able to solve this error by force-casting the key columns to integer. I changed the join from this...

    FROM DAILYV INNER JOIN BXV ON DAILYV.DAITEM=BXV.BXPACK
    

    ...to this...

    FROM DAILYV INNER JOIN BXV ON CAST(DAILYV.DAITEM AS INT)=CAST(BXV.BXPACK AS INT)
    

    ...and I didn't have to make any corrections to the tables. This is a very old, very messy database with lots of junk in it. I've made many corrections, but it's a work in progress.

提交回复
热议问题