JSON to SQL Server




      Is it possible to insert JSON data to SQL Server directly using stored procedure?


    Somthing like for XML we are using sp_xml_preparedocument and openxml. For JSON ???

    Monday, December 03, 2007 8:44 AM

All replies

  • To my knowledge there is not built-in procedures to import JSON. You might ask the folks in the T-SQL forum, but I'm fairly confident the answer is no. I'm sure you could write a procedure to do so though.





    Wednesday, December 05, 2007 3:41 AM
  • Yes Mike,


       I also searched in lot of articles. They said that you have to write own .NET CLR function like openxml to store JSON data. Any one guide me how to write .NET CLR function for SQL Server 2005?...



    Thanks in Advance 


    Thursday, December 06, 2007 5:13 AM
  • Hello, Here I would like to share my openion, I think I have got the point and I would like to answer about your question. There are following steps that have to follow to do do so.

    1. Download and Install SSIS Json Source Connector.
    2. From your tool box Drag SSIS JSON Source.
    3. Specify JSON File or URL from where you want to consume JSON data.
    4. Click on Columns tab and select columns you want to select.
    5. Drag OLEDB Destination. Select SQL Server connection and Target Table where you want to load data.
    6. Map Input columns to Target SQL Server Table.
    7. Run the package. 
    Tuesday, August 04, 2015 8:18 AM
  • JSON support is added in SQL Server 2016

    Thursday, October 29, 2015 1:16 PM