Page 1 of 1
column change
Posted:
Wed Jun 01, 2011 8:30 am
by makkena
I had a requirement to change column of a table from integer to char.The table has data.can any one pls tell the steps to do that.Data should be retained.
Re: column change
Posted:
Wed Jun 01, 2011 8:36 am
by dick scherrer
Hello,
Unload the data, make the column definition change, reformat the unloaded data to the proper format data, load the data.
Re: column change
Posted:
Wed Jun 01, 2011 8:42 am
by makkena
Thanks for the reply.I tried that.The data is not gtting loaded.facing the below error.
DSNU390I -D820 151 06:06:10.78 DSNURWUF - INVALID CONVERSION FOR FIELD - ACCOUNT_NBR
151 06:06:10.80 DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8
Re: column change
Posted:
Wed Jun 01, 2011 8:44 am
by makkena
Sorry..i didnot format the data.Could you please let me know how to format the data.
Re: column change
Posted:
Wed Jun 01, 2011 9:19 am
by dick scherrer
Hello,
Read the unloaded data with the old format data and write a new file with the data formatted to match the new column definition.
One way to do this would be to use your sort product. Another would be to write a little bit of actual code.
Re: column change
Posted:
Wed Jun 01, 2011 1:02 pm
by GuyC
You could have unloaded char(int_col1). Sort is the way to go now I guess.