I am having a result as
code Declaration Quantity
123 a1 11boxes Note:(Each box Contains 20nos)
123 a2 230nos Note:(Each contains 100nos)
123 a3 60nos
I need to display as
code Declaration Quantity
123 a1 11boxes
123 a2 230nos
123 a3 60nos
Is it possible to split the line and to display before note?
You can search the
quantityfield for the wordnoteto return a result, but this answer assumes that any notes will not be prefaced by a different word.If you want to check for the
note, then you can usecharindex(), similar to this:See SQL Fiddle with Demo.
The result is: