How can we help you today? How can we help you today?

How can I stop OPENJSON after CROSS APPLY from showing up on new line

SELECT *
  FROM OPENJSON(@..., '$.Doc') AS OJ
       CROSS APPLY OPENJSON(OJ.Value)
         WITH (ID int) AS CAOJ

becomes

SELECT *
  FROM OPENJSON(@..., '$.Doc') AS OJ
       CROSS APPLY
       OPENJSON(OJ.Value)
         WITH ( ID INT ) AS CAOJ
sfrigard
0

Comments

3 comments

  • Jessica R
    Hi @sfrigardand thanks for your post!

    Can you please share a copy of your style file that we may test with?
    Jessica R
    0
  • sfrigard
    I have attached my style that I am currently setting up. In addition I have attached a sanitized SQL script with my target formatting.
    sfrigard
    0
  • Dan_J
    Hi @sfrigard

    Many thanks for providing your style file and SQL script.

    I have manipulated the style you sent over, but unfortunately it does not currently appear to be possible to achieve the formatting your are after. 

    Given this, would you be happy to request that this formatting be made possible via our User Voice page (https://redgate.uservoice.com/forums/94413-sql-prompt)?  This will mean it is visible to our development team for their consideration.



    Dan_J
    0

Add comment

Please sign in to leave a comment.