/**Begin D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_MDS_WRITEOFFREC', 'T_MDS_WRITEOFFREC', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_WRITEOFFREC') CREATE INDEX IDX_MDS_WRITEOFFREC ON T_MDS_WRITEOFFREC ( FBILLNO ,FORGID );


 EXEC P_ALTERPK 'PK_T_MDS_WRITEOFFREC_L', 'T_MDS_WRITEOFFREC_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_WRITEOFFREC_L') CREATE INDEX IDX_MDS_WRITEOFFREC_L ON T_MDS_WRITEOFFREC_L ( FID ,FLOCALEID );



/**End D:\k3Cloud\PDM_UPGRADE\PDM1\MDS_constraint.sql **/
