2

Software: QGIS 2.18.19

Spreadsheet: Office Libre 5.3.4.2

GitHub Link: Bklyn




Update 1

@ben-w

I turned on Toggle Editing. When I tried to change datatype, I get error

enter image description here




Original Question

I wish to change datatype of column BBL of Bklyn_BBL.zip (the .dbf file) from Decimal to Whole Number.

When try in Office Libre I keep getting errors when I save

enter image description here

The QGIS Attribute table is not editable

enter image description here

Then went to QGIS I tried downloading Table Manager plugin to edit the attributes but I cannot find it under Processing > Toolbox

Please guide.

0

1 Answer 1

3

I believe that since 2.16 this can be done without plugins. Instead of trying to edit the attribute table directly, edit the fields by first toggling editing on the layer then right clicking and going to layer properties and then clicking on the Fields tab. As for finding the Table Manager plugin, it should under the vector menu, but be aware this plugin is now deprecated; it is recommended to use Refactor Fields in processing toolbox > QGIS geoalgorithms > Vector table tools.

Edit:

Thinking more about this, my answer above may only work for editing field names etc but not changing data type. I know I have done this before but I am away from my computer at the moment so I can't test any methods. You might have to use the Field Calculator to create a new field with type set to integer, and use a conversion to populate the new column. I think the expression should be something like: toint("BBL"). You can then use Refactor Fields (or Table Manager) to delete the redundant column that has the "real" data type and change the order of the columns if you wish.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.