convtohyb Examples
Given a database userdb with tables tab1, tab2, tab3, and tab4 with ingresdate, char, and varchar columns, the following command creates statements to convert all char and varchar columns of all tables to use UTF-8 instead of the installation character set and changes ingresdate columns to the appropriate ANSI data time column type.
convtohyb userdb –to_utf8 –to_ansi
The following command creates statements to convert ingresdate columns to the appropriate ANSI data time column type. It also examines the char and varchar data to see if these contain consistent date time data and, if so, converts these to ANSI too.
convtohyb userdb –to_ansi –ch_to_ansi
The following command converts three columns in the tab1 table and all columns of tab2 table of the userdb database into UTF-8 data. The sqlfile=myfile.sql and the executable script is generated in directory /users/ingres/myloc:
convtohyb userdb -to_utf8 -dest=/users/ingres/myloc sqlfile=myfile.sql -col=tab1.col1
-col=tab1.col2 ‑col=tab1.col3 tab2
The following command immediately executes the above commands:
convtohyb userdb -automodify -to_utf8 -col=tab1.col1 -col=tab1.col2 -col=tab1.col3 tab2
The following command converts all columns of all tables, but only col1 and col2 of the tab1 table:
convtohyb userdb -automodify -to_utf8 -col=tab1.col1 -col=tab1.col2
Last modified date: 04/03/2024