Seperating and counting CSV entries from database (Access/ASp Classic)

Posted by Katherine Perotta on Stack Overflow See other posts from Stack Overflow or by Katherine Perotta
Published on 2012-04-14T16:59:13Z Indexed on 2012/04/14 17:29 UTC
Read the original article Hit count: 184

Filed under:
|
|
|
|

hey i could really use some help with this one. I have a faq with multiple "tags" and I would like to separate and count them.

They are currently in the database as follows:

ID-----------------TITLE--------------CONTENT-----------TAGS

Sample Records:

1---------------sampletitle 1---------amplecontent--------tag1,tag2,tag3
2---------------sampletitle 2---------moresamplestuff-----tag3,tag4,tag5

How could I go about counting the number of times each tag is used? In the end, would it be easier to just create a separate table called TAGS, with a single tag corresponding to a single ID in FAQ? The only reason I don't prefer doing something like that is because I have so much data already it would take quite a while. However, if there's no alternative or if its easier than doing string parsing like that, im willing to do it.

The goal is to display each unique tag and the number of times it is used.

Would it be better to do the heavy lifting in the database or ASP?

I have gotten as far as getting a list of all tags and displaying them in an array (with each tag separated). So at this point what I need to do is count each value and then remove the duplicates (while preserving the count number somewhere).

This is in ASP classic using an Access database. Thanks!

© Stack Overflow or respective owner

Related posts about database

Related posts about csv