On-demand training: More Gems from the SQL Prompt Treasure Chest. Watch now.

BUG: OPENJSON( ) and Square Brackets

ArnieRowlandArnieRowland Portland, OR USA Posts: 8 Bronze 1
edited January 27, 2020 6:55PM in SQL Prompt
SSMS, ADD Square Brackets is enabled. Most current SQL Prompt and SSMS upgrades.

When SQL Prompt formats, and adds Square Brackets, as desired, the following error is encountered with OPENJSON( ).

In a multi-table JOIN that includes an OPENJSON( ) table as a JOIN participant, SQL Prompt will add Square Brackets to [OPENJSON]( ). That will then cause the query to fail. 

Square Brackets are  NOT added when OPENJSON( ) is the ONLY table in a query.


Sign In or Register to comment.