What are the challenges you face when working across database platforms? Take the survey

Cannot obtain previous formatting of simple statement...

I have tried every setting I know to be able to replicate our previous formatting but this one has me at a loss. Any ideas how to get the LATEST SQL Promt to match my first example (previous)? Note how I cannot get the INSERT statement to wrap placing the column names in a single column and the values does not wrap at all.

Previous formatting using SQL Prompt

INSERT INTO [dbo].[user_name_filter]
( [accnt_id],
[query_value] )
VALUES ( @accnt_id,
ISNULL(@query_value, '') )

Current formatting using LATEST SQL Prompt

INSERT INTO [dbo].[user_name_filter] ([accnt_id],
VALUES (@accnt_id, @user_id_key, @filter_id, @field_id, @operand, ISNULL(@query_value, ''));

Best Answer

  • Options
    way0utwestway0utwest Posts: 313 Rose Gold 1
    First, which version are you using. Prompt revs so often that "latest" is hard to know.

    I don't know we can do this exactly. If you edit formatting styles, there is an INSERT item on the left.


    Under here, I think the last item in the first row matches closely to what you want with the always option selected. We don't have a good option to only put the first item on the end of the line. That seems like an option that inconsistently lists items to me, but that may be what you want. I'd suggest you add this to Uservoice if it's important to you.

    Below that, the VALUES item list, second item in second row, might be what helps you with the Values clause.


  • Options
    Thank you for pointing me to the correct place. I had looked there before the did not realize there were more settings below which was for the VALUES keyword. I maximized the window this time was able to see the new settings you pointed out. I had to set it to always place each 'value" on a separate line and now I am much closer to getting it matching previous format layouts.

    My version is used in SSMS. Thanks again! Very much appreciated.
  • Options
    You are welcome. Glad to help.
Sign In or Register to comment.