The forum will be down for maintenance at some point between Friday, September 25, 2020 at 5pm PDT and Sunday, September 27, 2020 at 11:59 PDT. Downtime is unknown but will be minimized.

If you have agreed on a json format like for example:

{ "firstName": "Frank","middleName": null,"lastName": "Vestjens"}

Then the json is also valid if the middleName is not mentioned

{ "firstName": "Frank","lastName": "Vestjens"}

But then the sp_parse_json does not know the middleName. Because if I use test.middleName I'll get the error

"Column 'middleName' not found in variable 'test'"

Is there a way to test whether this middleName exists after parsing the json?

asked 15 Sep, 03:22

Frank's gravatar image

accept rate: 18%

(15 Sep, 03:52) Vlad

The build is 6089.

It has nothing to do with the null reference. That's working fine. It's about not having the property in the json.

(15 Sep, 04:04) Frank
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 15 Sep, 03:22

question was seen: 42 times

last updated: 15 Sep, 04:06