/**Begin D:\pdm\TCUT_constraint.sql **/
 EXEC P_ALTERPK 'PK_BD_LEVYREFUND', 'T_BD_LEVYREFUND', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_LEVYREFUND_GROUP') CREATE  CLUSTERED INDEX IDX_BD_LEVYREFUND_GROUP ON T_BD_LEVYREFUND ( FGROUP );


 EXEC P_ALTERPK 'PK_BD_LEVYREFUND_L', 'T_BD_LEVYREFUND_L', 'FPKID', '0';

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


 EXEC P_ALTERPK 'PK_BD_LEVYREFUNDGROUP', 'T_BD_LEVYREFUNDGROUP', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_LEVYREFUNDGROUP') CREATE  CLUSTERED INDEX IDX_BD_LEVYREFUNDGROUP ON T_BD_LEVYREFUNDGROUP ( FNUMBER );


 EXEC P_ALTERPK 'PK_BD_LEVYREFUNDGROUP_L', 'T_BD_LEVYREFUNDGROUP_L', 'FPKID', '0';

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


 EXEC P_ALTERPK 'PK_BD_LEVYREFUNDMAP', 'T_BD_LEVYREFUNDMAP', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_LEVYREFUNDMAP') CREATE  CLUSTERED INDEX IDX_BD_LEVYREFUNDMAP ON T_BD_LEVYREFUNDMAP ( FNUMBER );


 EXEC P_ALTERPK 'PK_BD_LEVYREFUNDMAP_L', 'T_BD_LEVYREFUNDMAP_L', 'FPKID', '0';

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


 EXEC P_ALTERPK 'PK_BD_LFMAP_MATERIAL', 'T_BD_LFMAP_MATERIAL', 'FPKID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_LFMAP_MATERIAL_FK') CREATE  CLUSTERED INDEX IDX_BD_LFMAP_MATERIAL_FK ON T_BD_LFMAP_MATERIAL ( FID );


 EXEC P_ALTERPK 'PK_BD_LFMAP_MATERIALGROUP', 'T_BD_LFMAP_MATERIALGROUP', 'FPKID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_LFMAP_MATERIALGROUP_FK') CREATE  CLUSTERED INDEX IDX_BD_LFMAP_MATERIALGROUP_FK ON T_BD_LFMAP_MATERIALGROUP ( FID );


 EXEC P_ALTERPK 'PK_BD_TAXUSE', 'T_BD_TAXUSE', 'FID', '0';

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


 EXEC P_ALTERPK 'PK_BD_TAXUSE_L', 'T_BD_TAXUSE_L', 'FPKID', '0';

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


 EXEC P_ALTERPK 'PK_BD_TAXUSEGROUP', 'T_BD_TAXUSEGROUP', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_TAXUSEGROUP') CREATE  CLUSTERED INDEX IDX_BD_TAXUSEGROUP ON T_BD_TAXUSEGROUP ( FNUMBER );


 EXEC P_ALTERPK 'PK_BD_TAXUSEGROUP_L', 'T_BD_TAXUSEGROUP_L', 'FPKID', '0';

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


 EXEC P_ALTERPK 'PK_BD_TAXUSEMAP', 'T_BD_TAXUSEMAP', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_TAXUSEMAP') CREATE  CLUSTERED INDEX IDX_BD_TAXUSEMAP ON T_BD_TAXUSEMAP ( FNUMBER );


 EXEC P_ALTERPK 'PK_BD_TAXUSEMAP_L', 'T_BD_TAXUSEMAP_L', 'FPKID', '0';

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


 EXEC P_ALTERPK 'PK_BD_TAXUSEMAPBASE', 'T_BD_TAXUSEMAPBASE', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_TAXUSEMAPBASE_FK') CREATE  CLUSTERED INDEX IDX_BD_TAXUSEMAPBASE_FK ON T_BD_TAXUSEMAPBASE ( FID );



/**End D:\pdm\TCUT_constraint.sql **/
