I have a column with data like {"Type":1,"ApplicationID":1,} or
{"Type":1,"ApplicationID":158,}
or
{"Type":1,"ApplicationID":234,"TarifType":1,"TarifID":2} or etc.
I tried with
SELECT PATINDEX('%"ApplicationID":___,%', '{"Type":1,"ApplicationID":177,}')
or
SELECT PATINDEX('%"ApplicationID":[0-9][0-9][0-9],%', '{"Type":1,"ApplicationID":177,}')
to fetch the index of expression it returns a value.
But the problem is the application id can be any number from 1 to int (max) so we cannot fix the number of integer chars as it is in above queries.
If i can find the correct path index than, I might be able to find the substring later.
Is there any way to do this? I need to use the application ID in subquery or cor-related query. Otherwise we can store it in some temp table.
Please suggest a way to fetch this id.
