Gotcha!
USE [FTBL]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[usp_insCountries] @dt AS dbo.udt_InsCountries READONLY
AS
BEGIN
UPDATE dbo.tbl_countries_feed
SET country_Id = dt.country_Id,
country_Name = dt.country_Name,
country_Fifa_Code = dt.country_Code
FROM dbo.tbl_countries_feed AS countries INNER JOIN @dt AS dt
ON countries.country_ID = dt.country_Id;
INSERT dbo.tbl_countries_feed(country_Id, country_Name, country_Fifa_Code)
SELECT country_Id, country_Name, country_Code FROM @dt as dt
WHERE country_Id NOT IN(SELECT country_Id FROM dbo.tbl_countries_feed)
END
I just need to make my T-SQL knowledge deeper..
Have a nice Sunday!