Санкции — новая реальность России

DECLARE @chpUrl varchar(500) = ‘sankcii-novaya-realnost-rossii-20220225-114300’; SELECT F.[id], F.[title], F.[body], F.[date], F.[ChpURL], [AmpUrl] = CASE WHEN COALESCE(PS.[Name], ») > » THEN ‘/amp/news/’ + PS.[Name] + ‘/’ + F.[ChpURL] + ‘/’ ELSE NULL END, [authorFio] = COALESCE(A.[fio], »), [authorCompany] = COALESCE(F.[authorCompany], A.[firma], ») FROM [dbo].[Forecasts] AS F LEFT OUTER JOIN [Publications].[Sources] AS PS ON PS.[SourceID] = 12 LEFT OUTER JOIN [dbo].[NewsOnlineAuthors] AS A ON A.[id] = F.[author] AND A.[id] > 0 WHERE F.[ChpURL] = @chpUrl OR LEFT(F.[ChpURL], LEN(F.[ChpURL]) — 2) = LEFT(@chpUrl, LEN(@chpUrl) — 2))

Author: finprognozy

Добавить комментарий