#1 2015-07-02 21:38:35

array81
Member
From: Italy
Registered: 2010-07-23
Posts: 411

Change field type

In the past I have create a table with a column defined as TEXT column.
However I have saved numbers and not text inside this field, so now I'd like change column definition to FLOAT.
I have try to use external editor but I get always the same error: "no such collation sequence:_SYSTEMNOCASE".

I need change it in alternative when I use SUM inside my query I get problem with negative numbers.

Is there a way to do this?

Offline

#2 2015-07-03 07:07:55

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,231
Website

Re: Change field type

You could change the default collation, but only at table creation, AFAIK.
See http://synopse.info/files/html/Synopse% … #TITLE_136

Some possibilities:

1. Add a new FLOAT column, and put the FLOAT values in this new field.
2. Change the table layout (i.e. a new class type definition), and move all data to the new class.

In both cases, create a small update function, using a FillPrepare() to read, and a Batch to write.

Offline

Board footer

Powered by FluxBB