SQL Prompt - Format SQL oddity

twenzeltwenzel Posts: 6 Bronze 1
edited September 18, 2018 8:27PM in SQL Prompt
Why is it that when i highlight a selection of text to apply the "Format SQL", the ENTIRE page has to have proper SQL syntax otherwise my highlighted text will not be formatted?? This used to work because i did it all the time.
Tagged:

Best Answer

Answers

  • I've noticed this as well. I've sent a note off to see if this is a fundamental behavior change or a bug. 

    I have been able to get this to work by putting a "GO" before my statement/query and then formatting it.
  • I tried putting a "GO" before the query i wanted to format, but it did not help. I'm running Ver 9.2.8.6358. I did see a post from this summer that sounded like this issue, and it appears that RG knows about this, but there are many more higher priority items to work on. So this is just sitting - it's unfortunate because i used to selectively format SQL on a "working" page with other text that is not syntactically correct for testing. It makes that type of usage harder, because i cannot format SQL i am writing/testing on this type of page...
  • Is there broken code after the area you're trying to format? If I get my code into a batch, it seems to format. 

    If you have an example of the code for me to test, I'd be happy to. I have 9.2.7 on this machine, but 9.2.9 on another.
  • This is happening to me as well.  I used to be able to highlight the code and format and it didn't matter if other code in the window had errors.  Now, all the code has compile for the highlighted code to be reformatted.  I'm not sure what version this behavior changed.  I am currently using SQL Prompt 9.2.9.6459
  • wayOutwest...Here is an example that does not work for me:
    SELECTz * FROM Company 

    GO  
    SELECT * FROM Company
    GO  
  • way0utwest - Thanks for your help!
Sign In or Register to comment.