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":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11132119