Changing field type

deepbluedeepblue Member Posts: 152
hello,

I want to change a field type in a table from code to dateformula but the field in the table is not empty!!!

what can i do?

thank you!!!

Answers

  • johnson_alonsojohnson_alonso Member Posts: 690
    Hi Pal,
    I think you can't change filed type without emptying the table. I have ever tried to do that but I failed.

    rgds,
    Johnson Alonso
  • deepbluedeepblue Member Posts: 152
    ok!

    So if I make the table empty how could I save my data and re-insert it in the table?

    thanks!!
  • johnson_alonsojohnson_alonso Member Posts: 690
    Hi Pal,
    all you need is only emptying the certain field that you want to change its type. I suppose not to delete all datas in the table but only data in the certain field that you want to change its type. The data can't be store. YOu must rewrite it. Maybe you can create two database and use form 8601 in the object designer to move the data from old to new one. the old containing field type code and new database containing field type dateformula but I am not so sure for this.


    rgds,
    Johnson
  • krikikriki Member, Moderator Posts: 9,118
    Or you can:
    -create a new field of the same datetype as the field whose data type you want to change
    -copy the value of the old field to the new field and delete it in old field
    -change the datatype of the old field (now you can because you just deleted it)
    -copy the field back (you might need to do some conversion) and remove it from the new field
    -delete the new field.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.