selecting the text between the final two speech marks - MS SQL

Soldato
Joined
18 Oct 2002
Posts
6,822
hi guys,

does anyone know how to extract the text between the final two speech marks?

[{"Id":0,"ProjectId":[],"Field":"SLA","Operator":"Equal","Value":"Dev P1"},{"Id":0,"ProjectId":[],"Field":"Resource","Operator":"Equal","Value":"6,8,11,12,17,19,28,29,31,32,34,35,38,47,54,56,57,59,60,62,64,65,67,68,71,72,74,76,78,81,82,83,85,87,88,89,99,101,113,117,128,130,133,136,146,150,153,160,163,164,167,174,175,176,181,184,186,192,198,199,200,203,204,207,213,214,215,216,219,220,221,225,227,229,230,231,236,244,245,247,251,252,256,257,258,260,263,270,281,282,283,284,285,289,290,292,293,300,306,309,311,312,313,319,321,323,329,331,332,333,334,337,340,342,343,345,346,348,351"}]

the length of the fields can change and i keep ballsing it up haha. any ideas?

Many thanks,

B@
 
This bit?

"6,8,11,12,17,19,28,29,31,32,34,35,38,47,54,56,57,59,60,62,64,65,67,68,71,72,74,76,78,81,82,83,85,87,88,89,99,101,113,117,128,130,133,136,146,150,153,160,163,164,167,174,175,176,181,184,186,192,198,199,200,203,204,207,213,214,215,216,219,220,221,225,227,229,230,231,236,244,245,247,251,252,256,257,258,260,263,270,281,282,283,284,285,289,290,292,293,300,306,309,311,312,313,319,321,323,329,331,332,333,334,337,340,342,343,345,346,348,351"

Where is the text from? What are you using? Is this all from a single field in SQL?
That bit, yes.

This is all in a single field in SQL. It's a database of a third party program so i can't change how the data is stored. It's a list of userIDs.

B@
 
i know how to split between 2 characters but i don't know how to split between the last 2 instances of that character - this is what i need help with. There are multiple speech marks and the length of the string changes each time. It is always at the end of the string though.

B@
 
Back
Top Bottom