Hey there,
I don't think this is possible in SQL and requires VBA, but thought I'd ask.
I have a column that contains various values including NULL, a single word or acronym, or a comma-separated list of those words and acronyms. These entries indicate various mistakes I've made on those particular stock trades.
Sample data:
NULL
Entry
Exit
Exit, Shares
BRB, 4R
Currently, when I do a query, it returns the whole string which confuses the issue of how many of each type of mistake I've made over a period of time.
I'm hoping for a simple query to split up those comma-separates values and present a total for each word or acronym.
Currently, I have a query that is a union of several queries that each look for one of those strings. It works fine but it's clunky and if I add new mistake types, I have to create a new, specific query to add to the union.
The other solution I've thought of is to write some VBA or a query that will split up those values and create a Mistake types table that I can use for some kind of join to generate the separated results.
I'd appreciate your thoughts.
Cheers,
Eric