You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

OPENJSON解析JSON表问题求助:Balance_Sheet表无法正常工作

技术问题求助:Balance_Sheet表无法正常工作

我遇到一个技术问题需要协助,无法使Balance_Sheet表正常工作,相关演示地址为dbfiddle.uk/5besOGoU,当前使用的T-SQL代码如下:

SELECT
j1.*
-- ,j2.*
,j3.*
FROM OPENJSON(@response)
  WITH (
    request nvarchar(max),
    [type] nvarchar(max),
    results nvarchar(max) AS JSON
) j1
outer APPLY OPENJSON(j1.results)
  WITH (
    results_type nvarchar(100) '$.type',
    results_id nvarchar(100) '$.id',
    segmentation nvarchar(max) '$.tables.segmentation' AS JSON,
    financial_statement_restate_json nvarchar(max) '$.tables.financial_statements_restate' AS JSON
  ) j2
        outer APPLY OPENJSON(j2.segmentation)
          WITH (
                [period_3m_currency_id] nvarchar(max) '$.period_3m.currency_id',
                [period_3m_fiscal_year_end] nvarchar(max) '$.period_3m.fiscal_year_end',
                [period_3m_period] nvarchar(max) '$.period_3m.period',
                [period_3m_report_type] nvarchar(max) '$.period_3m.report_type',
                [period_3m_accounts_payable] nvarchar(max) '$.period_3m.accounts_payable',
                [period_3m_accounts_receivable] nvarchar(max) '$.period_3m.accounts_receivable'
            )
          j3

内容的提问来源于stack exchange,提问作者user254060

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.24 23:42:36