IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_PUR_INSTOCKENTRY_A_SRCINSENTRYID') CREATE INDEX IDX_T_PUR_INSTOCKENTRY_A_SRCINSENTRYID ON T_PUR_INSTOCKENTRY_A ( FSRCINSENTRYID );