This is a discussion on IXF LOADing w/ different column orders within the DB2 forums, part of the Database Server Software category; --> DB2 WSUE LUW v8.2 FP4 (aka v8.1 FP11) RHEL AS 4 I am EXPORTing in IXF format from one ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| DB2 WSUE LUW v8.2 FP4 (aka v8.1 FP11) RHEL AS 4 I am EXPORTing in IXF format from one schema and then LOADing into another schema. The DB modeling tool I am using likes to put the PK columns at the very top of the CREATE TABLE ddl, so the ordering of the columns in the FROM schema is different from the ordering in the TO schema. All of the columns are there named the same way, just different order. When I try to do the LOAD w/ no METHOD specified, it complains about columns being non-null and how the input is invalid. However, if I use METHOD N on the LOAD and explicitly list out the column order, it works. The column names are the same on both sides. Why does the order of the columns matter? Can't LOAD figure this out by itself? TIA aj |
| ||||
| The Column Order always matters. When you export data from table, it will have the column order. So your "From" data will have the perticular order. While import/Load you should maintain that order, if your "TO" Table is same as your "FROM" table including column order. But if "TO " table column order is changed then you have to use the Method N. Be careful while using load and import because if you have big datafile to import and if the column order does not match, it may take long time, because every time it will try to import/Load the data it will throw an error. So take care in that. Hope this helps. Darshan. |