MsSQL

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDatabasesMsSQL

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old March 16th, 2014, 07:13 AM
wewe_2090 wewe_2090 is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Mar 2014
Posts: 1 wewe_2090 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 4 sec
Reputation Power: 0
SQl query Help

Dear all,

i would like to count comma seprated values in sql:
here is my table:

TM_ID:

17,19,23
17,22,35,36,57
11,17,19,21
11,13
17,19,23,27,29,28
12,13

so the total 17 is 4


i would like to count the total record, for example:
TM_ID = 17

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

please help..
this query will count the record which 170, 117...

Last edited by wewe_2090 : March 16th, 2014 at 07:16 AM.

Reply With Quote
  #2  
Old March 17th, 2014, 11:34 AM
jethrow jethrow is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Aug 2013
Posts: 83 jethrow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 16 h 59 m 36 sec
Reputation Power: 6
Could you please clarify your question? You already have a working query.

Last edited by jethrow : March 17th, 2014 at 11:47 AM.

Reply With Quote
Reply

Viewing: Tutorialized ForumsDatabasesMsSQL > SQl query Help


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap