Load JSON into SQL Server Using a Stored Procedure and C#

3 Comments

  1. Hi , can you suggest me what if my JSON has an object with children and grand children. How do I get them to different temp tables in the stored procedure?

  2. Nice article. However, I noticed the Stored Procedure OPENJSON run only on database with compatibility_level 130 and above.

    You can use below to change the compatibility_level.

    SELECT compatibility_level
    FROM sys.databases WHERE name = ‘DatabaseName’;

    ALTER DATABASE DatabaseName
    SET COMPATIBILITY_LEVEL = 150;

    I hope this will ease someone struggling to run the store procedure

Leave a Reply (Markdown formatting available)

This site uses Akismet to reduce spam. Learn how your comment data is processed.