SQL Server 2016 and JSON Support

Sign in to queue

The Discussion

  • User profile image
    jkresic1

    I'm only 22 minutes into the video, and I am amused that I heard Jason Bourne when they were discussing @json, '$.Born',    !

  • User profile image
    mrsharps

    I LOVE how he is doing the examples! I like that most typical use cases with increasing difficulty get covered one by one.  Great intro video.  Well done!

  • User profile image
    Alex

    What shortcut to converts the JSON single line result into formatted JSON?

  • User profile image
    Celso

    Can somebody please help me out in What shortcut to converts the JSON single line result into formatted JSON?

  • User profile image
    keradininis

    Great tutorial, at a perfect pace.

    Thank you

  • User profile image
    keradininis

    @Celso:Use Sql Operations Studio. It works there.

  • User profile image
    aaa

    a

  • User profile image
    heena bhalodia

    Code :-
    --------------------------------------

    DECLARE @Json NVARCHAR(MAX) = '
    [
    {
    "RigthNumber":"RC01","RowVersion":[0,0,0,0,0,87,205,88]
    },
    {
    "RigthNumber":"RC02","RowVersion":[0,0,0,0,0,87,205,89]
    }
    ]
    '

    SELECT RigthNumber
    ,RowVersion
    FROM
    OPENJSON (@Json)
    WITH (
    RigthNumber varchar(50) '$.RigthNumber'
    ,RowVersion timestamp'$.RowVersion'
    )

    Current OutPut (Wrong Data in RowVersion)
    -------------------------------------------
    RigthNumber RowVersion
    RC01 0x
    RC02 0x


    Expected OutPut
    -----------------
    RigthNumber RowVersion
    RC01 0x000000000057CD8C
    RC02 0x000000000057CD8D

    Query : i dont get proper data for timestamp data type,can you help me?
    datatype of RowVersion is timestamp

Add Your 2 Cents