How to make, that values would not repeat at sampling? distinct does not help.
Request
select distinct ot.code, cp.Description, ml.Phone from dwh.dim.dimCatalogCounterparties cp with (nolock) join markets.dbo.otkreplen ot with (nolock) on ot.code = cp.Code collate SQL_Latin1_General_CP1_CI_AS join dwh.dm.CounterpartySegmentMainLink_Arc ml with (nolock) on ml.iCounterpartyID = cp.iCounterpartiesID Result
code Description Phone 101-00003362 ПП Школьний Дмитрий 380663984155 101-00003362 ПП Школьний Дмитрий 380675636350 101-00003362 ПП Школьний Дмитрий 380675636354 101-00003362 ПП Школьний Дмитрий 380675729293 101-00003362 ПП Школьний Дмитрий 380973470838 101-00004499 ГЕДЕОН ДТ 380509107240 101-00004499 ГЕДЕОН ДТ 380542658701