IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_RC_RECTA_RAT_GLB_DESP_REC]'))
begin
	ALTER TABLE [dbo].[RC_RECTA_RAT] DROP CONSTRAINT [FK_RC_RECTA_RAT_GLB_DESP_REC]
end
go
ALTER TABLE dbo.RC_RECTA_RAT ADD CONSTRAINT
	FK_RC_RECTA_RAT_GLB_DESP_REC FOREIGN KEY
	(
	CD_EMP,
	CD_DESP_REC
	) REFERENCES dbo.GLB_DESP_REC
	(
	CD_EMP,
	CD_DESP_REC
	) ON UPDATE  NO ACTION 
	 ON DELETE  NO ACTION 
	