/**Begin D:\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_HRCS_LBLFIELDTYPE', 'T_HRCS_LBLFIELDTYPE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_LBLFIELDTYPE') CREATE INDEX IDX_HRCS_LBLFIELDTYPE ON T_HRCS_LBLFIELDTYPE ( FLABELOBJECTID );


 EXEC P_ALTERPK 'PK_HRCS_LBLOBJECTFIELD', 'T_HRCS_LBLOBJECTFIELD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_LBLOBJECTFIELD') CREATE INDEX IDX_HRCS_LBLOBJECTFIELD ON T_HRCS_LBLOBJECTFIELD ( FFIELDTYPEID );


 EXEC P_ALTERPK 'PK_HRCS_LBLOBJECTFIELD_L', 'T_HRCS_LBLOBJECTFIELD_L', 'FPKID', '1';

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



 EXEC P_ALTERPK 'PK_HRCS_LBLFIELDTYPE_L', 'T_HRCS_LBLFIELDTYPE_L', 'FPKID', '1';

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


/** dimension  constraint**/

 EXEC P_ALTERPK 'PK_HRCS_LBLDIMENSION', 'T_HRCS_LBLDIMENSION', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_LBLDIMENSION') CREATE INDEX IDX_HRCS_LBLDIMENSION ON T_HRCS_LBLDIMENSION ( FLABELOBJECTID );


 EXEC P_ALTERPK 'PK_HRCS_LBLDIMENSION_L', 'T_HRCS_LBLDIMENSION_L', 'FPKID', '1';

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

/**  label scene **/

 EXEC P_ALTERPK 'PK_HRCS_LABELSCENE', 'T_HRCS_LABELSCENE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_LABELSCENE_FLBLOBJID') CREATE INDEX IDX_HRCS_LABELSCENE_FLBLOBJID ON T_HRCS_LABELSCENE ( FBIZAPPID );


 EXEC P_ALTERPK 'PK_HRCS_LABELSCENE_L', 'T_HRCS_LABELSCENE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_HRCS_LBLSCENEOBJECTIDS', 'T_HRCS_LBLSCENEOBJECTIDS', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_LBLSCENEOBJECTIDS') CREATE INDEX IDX_HRCS_LBLSCENEOBJECTIDS ON T_HRCS_LBLSCENEOBJECTIDS ( FBASEDATAID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_HRCS_LBLSCENEOBJECTIDS_FID') CREATE INDEX IDX_HRCS_LBLSCENEOBJECTIDS_FID ON T_HRCS_LBLSCENEOBJECTIDS ( FID );



/**End D:\PDM_UPGRADE\PDM1\HRCS_constraint.sql **/
