Seperating and counting CSV entries from database (Access/ASp Classic)
- by Katherine Perotta
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!