From The Document Foundation Wiki
Jump to: navigation, search

1. Tables that contain date fields, time fields, and date / time fields in the HSQLDB to add one VARCHAR field each:

       "Date_T" VARCHAR (10),
       "Time_T" VARCHAR (8),
       "DateTime_T" VARCHAR (19)

2. Run the following command via Tools → SQL:

       UPDATE "Table" SET "Date_T" = CAST ("Date" AS VARCHAR (10));
       UPDATE "Table" SET "Time_T" = CAST ("Time" AS VARCHAR (8));
       UPDATE "Table" SET "DateTime_T" = LEFT (CAST ("DateTime" AS VARCHAR (30)), 19);

3. After all fields are also available as text fields in the tables, the migration can proceed. Subsequently, the migrated Firebird database file must be in update again:

       UPDATE "Table" SET "Date" = "Date_T";
       UPDATE "Table" SET "Time" = "Time_T";
       UPDATE "Table" SET "DateTime" = "DateTime_T";