Hi, Integers are a bit difficult with Oracle because Oracle does not internally use such a datatype. Oracle does support defining a field as datatype INTEGER, but actually it is converted to NUMBER(38).
>From SQL Plus window: create table temp (test integer); desc temp TEST NUMBER(38) This setting does not prevent in any way storing non-integer numbers into that field. Oracle accepts for example this insert into temp values (2.34); This all means that clients reading a table schema from Oracle just can't know if some number column contains only integers. We have sometimes used an Oracle view in between and converted integers to strings. Naturally that solution is not usable if the application should do some calculations with the numbers but sometimes it makes is more simple to present the numbers so that they look like integers. -Jukka Rahkonen- > -----Alkuperäinen viesti----- > Lähettäjä: [email protected] > [mailto:[email protected]] Puolesta > Wolfgang Qual > Lähetetty: 4. maaliskuuta 2010 10:23 > Vastaanottaja: Users and Developers mailing list > Aihe: [Gvsig_english] gvSIG 1.9 and export to Oracle Spatial: > field definition is changed - bug > > Dear list, > a colleague of mine noticed that field definitions of a layer will > change when that layer is exported to Oracle Spatial. > For example, if a column of the shapefile to be exported was of type > "integer" it will be "real" after exporting (and re-importing to > shape-format). > Also, field length is changed to a higher value. This has an > additional > negative effect: the dbf-file will become much bigger (size > of the file) > Is this a bug? > > Best, > Wolfgang > > (ps: the attached screenshots show the differences: first table: > original, second: oracle spatial layer; btw, strange that no type is > marked for former integer fields! > I checked it again after importing back to shapefile - there, manage > fields dialogue says: field ist integer (ogrinfo says: real)) > > > _______________________________________________ Gvsig_internacional mailing list [email protected] http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
