10. Changing Column Type

There was one mistake in the previous chapter: the data type of the phone column (in the customers table) was set to Integer number. In reality, phone numbers may contain also other characters (parentheses, dashes …), notes about extensions, or even multiple phone numbers separated by commas. It is therefore necessary to change the column type to String. To do this, follow these steps:
1.
Display the customers table by selecting it in the Data document section.
2.
Right-click the header of the phone column, and select Column Properties from the context menu.
3.
In the displayed dialog showing the column properties, switch the Data type from Integer number to String. The change will be immediately applied to the table. Existing data in the column will be preserved – it will be only converted to the required data type.
4.
Now you can close the dialog in the usual way (click the cross in the dialog heading).
Note: the column properties dialog is always related to the active (or selected) column. If the dialog stays open while you move the cursor around the table, the information in the dialog reflects properties of the currently active column. Analogically, a modification made in the dialog is applied to the currently active column.
A document containing a modified table is stored in file Examples\Chapter 10.s-d.

Further Information

The following chapter of the Reference Guide contains detailed information on the discussed topic: