/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_CAS_RECWARNSET', 'T_CAS_RECWARNSET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_RECWARNSET_FBILLNO') CREATE INDEX INDEX_RECWARNSET_FBILLNO ON T_CAS_RECWARNSET ( FBILLNO );


 EXEC P_ALTERPK 'PK_T_CAS_RECWARNENTRY', 'T_CAS_RECWARNENTRY', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_RECWARNSET_ORGID') CREATE  CLUSTERED INDEX INDEX_RECWARNSET_ORGID ON T_CAS_RECWARNENTRY ( FORGID );


 EXEC P_ALTERPK 'PK_T_CAS_RECWARNRESULT', 'T_CAS_RECWARNRESULT', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_RECWARN_FBATCHNO') CREATE INDEX INDEX_RECWARN_FBATCHNO ON T_CAS_RECWARNRESULT ( FBATCHNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_RECWARN_FCREATER') CREATE INDEX INDEX_RECWARN_FCREATER ON T_CAS_RECWARNRESULT ( FCREATERID );


 EXEC P_ALTERPK 'PK_T_CAS_RECWARNRESULTENTRY', 'T_CAS_RECWARNRESULTENTRY', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_RECWARN_FBILLNO') CREATE  CLUSTERED INDEX INDEX_RECWARN_FBILLNO ON T_CAS_RECWARNRESULTENTRY ( FBILLNO );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\CAS_constraint.sql **/
