How to change the type of a column form integer to float

2180
3
07-15-2010 04:29 AM
Highlighted
Occasional Contributor III
Hi all,

In a SDE Oracle 10G goedatabase is thre a way to chage the type of a field from itneger to float.

I jsut tried to run a cript in oracle:

alter table
   mytable
modify
(
   angle    number(5,2)
);
commit;

and it worked in oracle, but I do not see the field type modified in ArcCatalog because it shows Short integer as type, instead of float

how can I change its type?
0 Kudos
3 Replies
Highlighted
Occasional Contributor
i created a float and looked at the data type. it is defined as  number(38,8).
0 Kudos
Highlighted
Occasional Contributor III
What I need is to change the type of an existing field from Short Integer to Float.
0 Kudos
Highlighted
Esri Esteemed Contributor
ArcSDE has had a column registry for a while now, which captures the column
types when the table is registered.  Oracle is the only database which permits
this sort of change, so there is no generic business process to support it.  The
supported process involves creating a temporary column, populating it, dropping
the old column, then adding the old name with the new type, copying from the
temp column, and dropping the temp column (or just creating a new table with
the new datatype and copying everything, which is far less destructive to table
disk organization).

IF your table is not versioned, and IF you're willing to take an unsupported
(and medium risk) step you can try altering the column registry.  I generally
avoid this kind of thing, even though I'm unlikely to be burned by it.  Be sure
to change all the relevant properties -- the SDE_TYPE values are published
in both the Client SDK and online documentation (SE_FLOAT32_TYPE is 3) --
and be sure to limit your UPDATE statement to a single row.

- V
0 Kudos