title: What is the best way to export data in JSON format to SQL using T-SQL?
body: <p>My code is as follows:</p>
  <pre><code>USE MyDb
  DECLARE @json varchar(max)='
  {
    &quot;BusinessEntityID&quot;:1,
    &quot;NationalIDNumber&quot;:&quot;295847284&quot;,
    &quot;JobTitle&quot;:&quot;Chief Executive Officer&quot;,
    &quot;BirthDate&quot;:&quot;1969-01-29&quot;,
    &quot;Gender&quot;:&quot;M&quot;
  }';
  SELECT FirstName, LastName FROM Person.Person WHERE  BusinessEntityID = JSON_VALUE(@json, 'BusinessEntityID')
  </code></pre>
  <p>I get the following error:</p>
  <blockquote>
  <p>Msg 13607, Level 16, State 3, Line 14
  JSON path is not well formatted. Found unexpected character 'B' at position 0.</p>
  </blockquote>