I have a table that contains some game description [descrip] that includes description, model/version, and value all as a single text. I need a query that will "remove" the model/version and just return the description with the value.
As the description may vary in length and number of words, I can't just use the Left and Right function. The common rules for what I need to remove are:
- Where the description contains a dollar sign ($) followed by any character other than a space:
- If there is a space prior to the dollar sign I want to remove that space plus any other characters to the left of that space up to but not including the next space.
- If there is no space prior to the dollar sign I want to remove the characters prior to the dollar sign and up to but not including the first space to the left.
- Here are some description examples where I have put in BOLD what I want the query to return and RED what I want the query to ignore.
- GOLDEN GODDESS FAM14-93 $.02P
- YOU BET YOUR A$ IPC12 $1P
- MONO BONUS CITY BB519$.05P(LE)
You'll notice that some of the descriptions also can include the dollar sign so it's important to destinguish that the "key" dollar sign is one without a trailing space (but rather a period or a number).
If it's easier I could even live with the query just returning the left bolded parts (the description) and dropping both the model/version and the value.