CREATE VIEW dbo.ApiItemReplacmentsView as
select Towar ItemId, Zamiennik ReplacmentId from dbo.ZamiennikiTowaru
UNION
select Zamiennik ItemId,  Towar  ReplacmentId from dbo.ZamiennikiTowaru where Dwustronny=1;