create or alter proc sp_Link_StokKart_Aktar as
-- exec sp_Link_StokKart_Aktar

 IF   EXISTS (SELECT *  FROM sys.tables WHERE  name='STOKKARTI')
 BEGIN 
 ALTER TABLE  Ent_TOKLU.dbo.STOKKARTI NOCHECK CONSTRAINT ALL
 drop table Ent_TOKLU.dbo.STOKKARTI 
end

 IF   EXISTS (SELECT *  FROM sys.tables WHERE  name='StokFiyat')
 BEGIN 
 ALTER TABLE  Ent_TOKLU.dbo.StokFiyat NOCHECK CONSTRAINT ALL
 drop table Ent_TOKLU.dbo.StokFiyat 
end 

 IF   EXISTS (SELECT *  FROM sys.tables WHERE  name='StokBarkodlari')
 BEGIN 
 ALTER TABLE  Ent_TOKLU.dbo.StokBarkodlari NOCHECK CONSTRAINT ALL
 drop table Ent_TOKLU.dbo.StokBarkodlari 
end 
 
--SELECT   * INTO Ent_TOKLU.dbo.[STOKKARTI] FROM [81.214.220.4,14500].[Ent_MARKA23].dbo.[STOKKARTI] 
--SELECT   * INTO Ent_TOKLU.dbo.[StokFiyat] FROM [81.214.220.4,14500].[Ent_MARKA23].dbo.[StokFiyat]
--SELECT   * INTO Ent_TOKLU.dbo.[StokBarkodlari] FROM [81.214.220.4,14500].[Ent_MARKA23].dbo.[StokBarkodlari] 



 