Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- добавить в falcon_search
- if(@typeID=100) begin
- -- поиск чисто по базе знаний
- insert into #result
- select top 20 id,
- '<a href="#" class="as-form-modal" data-code="knowledgeBaseArticle" data-slideout="1" data-itemID="'+try_cast(id as nvarchar)+'" data-big="1" data-title="'+isnull(title,'')+'"><i class="fab fa-leanpub"></i> '+title+'</a>',
- 'Обновил: ' + updatedBy + ' ' + convert(nvarchar,isnull(updated,'2020-01-01'),104) + ' ' + LEFT(convert(nvarchar, isnull(updated,'2020-01-01'),108),5),
- '',
- getdate()
- from kb_articles
- where (appCode is null or appCode='')
- and (title like '%'+@q+'%' or text like '%'+@q+'%' )
- order by charindex(lower(@q), lower(title)) desc
- select * from #result
- drop table #result
- return
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement