IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_PG_CRED_PG_CRED_IMP_RETIDO_PG_CRED1]'))
begin
ALTER TABLE [dbo].[PG_CRED_PG_CRED_IMP_RETIDO] DROP CONSTRAINT [FK_PG_CRED_PG_CRED_IMP_RETIDO_PG_CRED1]
end

