SELECT view_cms_tree_joined.*, view_cms_tree_joined.NodeName AS SearchResultName
FROM cms_attachment
INNER JOIN view_cms_tree_joined on view_cms_tree_joined.DocumentID = cms_attachment.AttachmentDocumentID
WHERE NodeAliasPath LIKE @NodeAliasPath
AND
([AttachmentName] Like N'%'+ @Expression + N'%' OR FREETEXT(attachmentbinary, @expression))
AND @SiteName = SiteName AND (@DocumentCulture = DocumentCulture OR @DefaultCulture = DocumentCulture )
|