SQL: Function to highlight text that has been searched for

The SQL Server function below 1, can be used to highlight text (while preserving the case) that has been searched for within a web page.

For example:

Source: “This is the source text”
Search: “source”
Function call:

Return value:

Web page output: This is the source text

  1. Please ensure you test any script taken from my website on a test/development machine, before running on a production server.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

CJayMead's SQL Server, Endeca, MS Office Help © 2018