本文介绍了如何使用rownumber?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将从这个字符串中获得一个@ json1



I will get one out put from this string @json1

{                
   "Status": "Success",                
   "Status Message": "Service Call Successful",                
   "Area":                
   [                
    
    {                
     "AreaCode":"A00009",                
     "AreaName":"BARSHI",                
     "FsCode":"TSM010",               
     "RegionCode":"R00001",                
     "RegionName":"MAHARASHTRA"                
   }, 
   {                
     "AreaCode":"A00008",                
     "AreaName":"BANGALORE",                
     "FsCode":"TSM040",               
     "RegionCode":"R00901",                
     "RegionName":"KARNATAKA"                
   },                              
    ]                
        }



现在我想要替换'}'之间的最后一个字符''' d']'符号任何解决方案都将不胜感激..



我尝试过:



i已经尝试了


now i want to replace last charecter ',' between '}' and ']' symbol any solution would be greatly appreciated..

What I have tried:

i have tried

set @json1=reverse(STUFF(REVERSE(@json1),charindex(',',@json1),1,''))





但没有用..

i希望像这样出来





but no use..
i want out put like this

{                
   "Status": "Success",                
   "Status Message": "Service Call Successful",                
   "Area":                
[                
    
    {                
     "AreaCode":"A00009",                
     "AreaName":"BARSHI",                
     "FsCode":"TSM010",               
     "RegionCode":"R00001",                
     "RegionName":"MAHARASHTRA"                
   }, 
   {                
     "AreaCode":"A00008",                
     "AreaName":"BANGALORE",                
     "FsCode":"TSM040",               
     "RegionCode":"R00901",                
     "RegionName":"KARNATAKA"                
   }                              
   ]                
}

推荐答案


这篇关于如何使用rownumber?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-21 10:40