我有一些JSON银行对帐单代码需要插入到表中,但我在SQL Server 2012上如何执行此操作时遇到问题,因为它似乎可能在2016年以上但不是在2012年。
无论是在那里还是MySQL都可以 - 作为参考,请参阅下面的代码。我想我需要两个表用于JSON文件的第一部分和第二部分。
有人能指出我如何处理这样的文件的正确方向吗? name
,status
,location
等第一行'仅包括一次,但其余部分在整个陈述中重复多次。
请参阅下面的JSON文件/内容的模拟测试样本/参考:
{" status":" success"," Name":" Theresa May"," Location": " 87654321"," AccountCategory":" Business"," AccountType":" Current"," TicketNo& #34;:" 12345-12"," AvailableBal":" 12775.0400"," BookBa":" 123475.0400&# 34;," TotalCredit":" 1234567"," TotalDebit":" 0","用法":&# 34; 5","期间":" 2014年5月11日至2014年7月11日","货币":" GBP",& #34;申请人":" Angel"," Signatories":[{"姓名":"不可用"," ; BVB":"不可用"}],"详细信息":[{" PTransactionDate":" 24-Jul-14" ," PValueDate":" 24-Jul-13"," PNarration":" Cash Deposit"," PCredit" :" 0.0000"" PDebit":" 40003.0000"" PBalance":" 40003.0000"}, {" PTransactionDate":" 24-JUL-14"" PValueDate" :" 23-Jul-14"," PTest":"现金存款"," PCredit":" 0.0000&#34 ;," PDebit":" 40003.0000"" PBalance":" 40003.0000"},{" PTransactionDate" :" 25-JUL-14"" PValueDate":" 22-JUL-14"" PTEST":"现金存款"" PCredit":" 0.0000"" PDebit":" 40003.0000"" PBalance&#34 ;:" 40003.0000"},{" PTransactionDate":" 25-JUL-14"" PValueDate":" 21 -Jul-14"," PTest":"现金存款"," PCredit":" 0.0000"," PDebit":" 40003.0000"" PBalance":" 40003.0000"},{" PTransactionDate":" 25 -Jul-14"," PValueDate":" 20-Jul-14"," PTest":" Cash Deposit",& #34; PCredit":" 0.0000"" PDebit":" 40003.0000"" PBalance":" 40003.0000"}]}