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

SQL Prompt Breaks Nested REPLACE Functions Onto Multiple Lines

Some of the stored procedures I need to reformat have statements with nested calls to the REPLACE function. My current configuration causes these nested calls to be placed on new lines, as shown in this screenshot:



I'd like to see what settings are affecting this behavior. I'd prefer to have the entire statement on one line (or as few lines as possible) so that I can manually decide where to make the line breaks.
DataJedi
0

Comments

10 comments

  • hassan_imam
    Hi DataJedi, 

    Apologies for the issues you are experiencing with SQL Prompt. If you go to SQL Prompt > Edit Formatting: 
     
    you can create a new style: The formatting which is being set is the default style unless changed prior.
    Can you try unchecking. Preserve existing empty lines between statements. 

    Please let know if this helps

    Best, 

    Hassan 
    Product Support Engineer 
    hassan_imam
    0
  • DataJedi
    Hello Hassan.

    I just checked, and "Preserve existing empty lines between statements" is already checked.

    Perhaps I can share my settings file with you?
    DataJedi
    0
  • hassan_imam
    Hi, 

    Sure, also could you send us a copy of the script in question so we can test it.  

    Best,

    Hassan
    Product Support Engineer

    hassan_imam
    0
  • DataJedi
    Sent you message with the files.
    DataJedi
    0
  • hassan_imam

    Hi DataJedi,

    Apologies for the delay. Could you please inform us of the active style you are currently using, or if you have a custom one configured can you send it to us?

    hassan_imam
    0
  • DataJedi
    Sent you message with the files. Let me know if you don't see it.
    DataJedi
    0
  • hassan_imam
    Thank you, However the style file should be a JSON file and should be saved here: C:\Users\<YourUser>\AppData\Local\Red Gate\SQL Prompt 10\Styles. Could you send me a copy of the custom style within that directory.
    hassan_imam
    0
  • DataJedi
    Ok. I sent the JSON file as a ZIP file. Your messaging system does not allow uploading of JSON files.
    DataJedi
    0
  • hassan_imam
    Hey DataJedi, 

    Thank you for sending over the files. After testing your script, I observed that the default style behaves consistently. However, there's flexibility to enhance it by unchecking the options within the wrapping section or specifying a character limit for wrapping as needed.



    hassan_imam
    0
  • DataJedi
    Ah, okay. I can work with that. Thank you so much.
    DataJedi
    0

Add comment

Please sign in to leave a comment.