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

how to count comma seprated values in sql

$
0
0

Dear all,

here is my table record for inch column:

Inch:

17,23,16

12,15,17,36,44

12,17,18,28

11,17,19

17,21,24,57

14,13

i want to count the record which split by comma

let said:

SELECT COUNT (TM_ID) AS TOTAL FROM TABLE WHERE TM_ID like '%17%'

it will count the total record of 17 in the table as 5

can some one please help me.

thanks


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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