Possible Duplicate:
Extracting dollar amounts from existing sql data?
I have a column in my MSSQL2008 database which contains row values such as this:
$10 / 1Mango
$12 / 2Mango + $11.95 / Great Casino
$11 Business Banana
$80 / XXXX + $12.34 / Soft XXX 24m
2*xpr Love $169.69
Good $5 Love
Longine $99 / 99Mango
How do I extract the $ values, such as $10 and add it to itself if there are more than one $ values in the same line, e.g. $12 / 2Mango + $11.95 / Great Casino to be equal to $23.95. Note that + separates a new entry of dollar values there can be more than 2 instances of $ values in which case how can automatically make it loop to generate me the total value and return as a money value?
Using this function to extract the amounts and this function to split the string