Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

LOOP in SQL for extracting string from one table and counting that string in the other table and show the result in the First table coulmn

$
0
0

 I have this query

select COUNT(*) from Table 1
where Keywords like '%acetone%'

I want to use the loop for taking input from table 2  instead of giving input word by word '%acetone%', and can do it for all record so want to use loop for all records. The result should be stored in the Table 2 column with the respective search.

Thanks and regards

Dua


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>