How to parse through a SQL Comments Column
Posted on 2014-08-28
I have a 'COMMENTS' field (column) as such:
CONVENTIONAL OIL PRICES PER QUART: $3.00 SYNTHETIC BLENDS:$4.00 TIRE ROTATION: $16.00 TIRE BALANCE: $8.00 LD & MD RATE: $72.00 HD RATE: NA
I need to parse this comment out to insert into individual columns.
The text in the above comments will go into a description column, i.e., (CONVENTIONAL OIL PRICES PER QUART, SYNTHETIC BLENDS, etc....) The dollar amounts will go into a "Cost" or "Amount" column.
I don't think it it is imperative to have the '$' included with the amount, but want to try it both ways.
So would end up with something like:
CONVENTIONAL OIL... $3.00
SYNTHETIC BLENDS $4.00
TIRE ROTATION $16.00
...and so on
So basically the comments column is comprised of a description and associated cost.