Cloning a Number as a Character Type

This operation requires that you set the DAOPT_Store_as_Char bit (512) in the da_options column of the corresponding DATAITEMS record. Additionally, you must change the value of the sql_type column to the appropriate character type (such as 1 for char, 2 for varchar, and so on). Finally, in the case of SQL Server, you must also change the value of the sql_length column, as this column has a value of zero for the int and smallint data types. An example for the item l_appl_code in the table loan follows.

File name: script.user_define.loan

update DATAITEMS set sql_type=1, sql_length=2, sql_scale=0, da_options=512
where item_name='l_appl_code' and table_name='loan'