IBM Support

Changing column's definitions from VARCHAR to VARGAPHIC in maximo database.

Technical Blog Post


Abstract

Changing column's definitions from VARCHAR to VARGAPHIC in maximo database.

Body

Building an Alter statement SQL when need to change the column's definition

from VARCHAR to VARGRAPHIC for all columns in maximo database

 

SELECT 'ALTER TABLE '||TBNAME||' ALTER COLUMN '||NAME||'SET DATA TYPE '||'VARGRAPHIC'||'('||LENGTH||')'||';'

FROM SYSIBM.SYSCOLUMNS where TBCREATOR ='MAXIMO' AND COLTYPE='VARCHAR'

 

Use the output of the above SQL and run it .

 

 

[{"Business Unit":{"code":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11132119