I work with Microsoft SQL server and Hangfire. In HangFire.Job table I have an Arguments column that stores foreign keys. For me, my Arguments column looks like this:
["20073"]
["20075","2","\"2021-07-29T11:00:00.139\""]
["20076","2","\"2021-07-29T11:15:00.484\""]
["20077","3","\"2021-07-29T11:15:00.418\""]
["20078","4","\"2021-07-29T11:30:00.104\""]
["20079"]
How can I get foreign keys without parentheses, date time, etc ? Foreign keys are: 20073, 20075, 20076, 20077, 20078, 20079. I tried to write SQL query(this is my sql query) to get foreign keys with PARSENAME and REPLACE, but it didn't work. Please help.
SELECT PARSENAME(REPLACE(Arguments , '\' , '.'),1)
FROM Hangfire.Job