Json进入SQL服务器SP [英] Json into SQL server SP
问题描述
我从该博客中无法分辨的是,如果有一种方法可以构建sp,你仍然可以将json作为变量传递,并让sp动态创建列。它说它可以,但我没有按照你设置预期数据类型的列类型的部分。
如果有一个干净的方法来做它我很想继续使用.net结构而不必使用另一个库。
任何反馈都会很棒。谢谢,
jason
我尝试过:
几个库并在.net中自己做这个但是它不干净且非常笨重
JSON数据(SQL Server) [ ^ ]
尝试本教程
Jason, I loved the post on automating JSON imports into sql via dynamic stored procs. I have a situation however where we will not know the structure of the json object and it could be anything (.net solution that users paste info online and we generate a grid of data).
what i couldn't tell from that blog if there was a way to build the sp where you could still pass the json as a variable and have the sp create the columns dynamically. it says that it can but i didn't follow the part where you set the columns types for the expected data types.
if there is a clean way to do it i would love to stay with .net structure and not have to use another library.
any feedback would be great. thanks,
jason
What I have tried:
several libraries and doing it myself in .net but it's not clean and very clunky
JSON Data (SQL Server)[^]
Try this tutorial
这篇关于Json进入SQL服务器SP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!