The column in question is varchar. I think the input value is longer than the target column. Loading from cursor will reject it (sql1194w), but loading from file will truncate it (sql3125w).
Question related to row_number:
$ db2 "select * from test"
C1 C2
----------- -----------
1 1
2 2
3 3
4 4
9 9
5 5
6 record(s) selected.
I want to sort by c1 and then select row #5:
$ db2 "select c1, c2 from (select row_number() over(order by c1) as rownum, t.* from test t) as t2 where rownum = 5"
C1 C2
----------- -----------
5 5
1 record(s) selected.
I'm sure there is a better way to write this query. Could someone suggest how this can be re-written?