Ok, I may be asking very stupid question but somehow I am not able to get a way to perform the following.
I have a table that contains two columns as below
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| SL No | Work |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
| 1 | Identify Process Champs across all teams for BCUK processes |
| 2 | Impart short training on FMEA to all the Process Champs |
| 2 | List down all critical steps involved in the Process to ascertain the risk involved, feed the details back to FMEA template to analyze the risk |
| 3 | Prioritize the process steps based on Risk Priority Number |
| 4 | Identity the Process Gaps, suggest process improvement ideas to mitigate/mistake proof or reduce the risk involved in the process |
+-------+-------------------------------------------------------------------------------------------------------------------------------------------------+
Now I have other table that holds the "Key Words" like below
+-------+----------+
| Sl No | Tags |
+-------+----------+
| 1 | BCUK |
| 2 | FMEA |
| 3 | Priority |
| 4 | Process |
+-------+----------+
Now I would like to "Search for String" in first table based on "tags" in second table and return something like this
+----------+-------+
| Tags | Count |
+----------+-------+
| BCUK | 1 |
| FMEA | 2 |
| Priority | 1 |
| Process | 8 |
+----------+-------+
As "Process"
keyword appears eight times
in the entire table (first table) across multiple rows it returns the count as 8.
I am using SQL Server 2014 Express Edition