Subscribe to this thread
Home - General / All posts - Change Type
pjrs15 post(s)
#25-Jul-20 16:55

Am I missing something obvious? Is there a 'Change Type' facility for fields in M9 tables? Can't spot anything at the moment; importing a table via csv produces everything in text; M8 provides the solution as it is easy to change the text into numeric for the Lat/Long data, and in M9 creating the Geom field, then Compose Point is fine, but I'd like to check I'm not missing a more straightforward route. (One day I'll find time to get the xls/xlsx route working which I assume will also provide a solution)

Dimitri

6,104 post(s)
#25-Jul-20 17:28

Use Edit - Schema to create a new field of the desired type, and then the Transform pane, Copy template to copy from the old field/type to the new field/type.

8 is a bit casual about changing data types, which drives DBMS people nuts, because it is a risk of breaking many things by just right clicking a column head and changing the type. For example, there may be many dependencies on the field being a particular data type.

9 was designed for use with DBMS connections of virtually any size, and in that world people want more rigorous control. So 9 takes the more rigorous route: create a new field of the type you want, and populate it with data. That also gives you the opportunity for richer, explicit control over the type conversion process.

I personally think both approaches have their moments. If I'm just goofing around with a project for my own use where I know nothing sophisticated depends on the data type, sure, it would be nice to have the process of a schema addition, copy, old field deleted and new field renamed, to be automated in the form of a right click on the column header and then picking change type. But I also get it why more sophisticated uses want it the way it is now.

pjrs15 post(s)
#26-Jul-20 12:40

Very many thanks. Happy to follow that route and pleased to know the reasoning.

As this data set is for ownership of manors in England in the 15th century, the data is somewhat flaky in the first instance, but the system is producing the maps required.

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.