Migrate simple large objects

To migrate simple large objects to smart large objects, cast TEXT data to CLOB data and BYTE data to BLOB data. You can use the cast syntax (bytecolblobcol, for example) to migrate a simple large object to a smart large object. The following example migrates the BYTE column cat_picture from the catalog table in the stores7 database to the BLOB field picture in the advert row type in the alternate catalog table that is described in Examples for smart-large-object functions:
update catalog set advert = ROW ((SELECT cat_picture::blob 
   FROM stores7:catalog WHERE catalog_num = 10027), pwd
   advert.caption)
   WHERE catalog_num = 10027

For a description of the stores7 table, see HCL OneDB Guide to SQL: Reference.

You can also use the MODIFY clause of the ALTER TABLE statement to change a TEXT or BYTE column to a CLOB or BLOB column. When you use the MODIFY clause of the ALTER TABLe statement, the database server implicitly casts the old data type to the new data type to create the ClOB or BLOB column.

For example, if you want to change the cat_descr column from a TEXT column to a BYTE column in the catalog table of the stores7 database, you can use a construction similar to the following statement:
ALTER TABLE catalog modify cat_descr CLOB, 
   PUT cat_descr in (sbspc);

For more information about the ALTER TABLE statement, see the HCL OneDB Guide to SQL: Syntax

For more information about casting, see the HCL OneDB Guide to SQL: Syntax and the HCL OneDB Guide to SQL: Tutorial.