Remove Brackets no longer functions like it used to - 10.0.10.13591

OzzieOzzie Posts: 46 Bronze 5
Previously, if I had this string from dragging over columns
[ResponseID], [StudyID], [StudyProtocolID], [SubjectVisitInterviewResponseID], [SubjectVisitInterviewItemID]

Pressing Ctrl-B Ctrl-B would give me
ResponseID, StudyID, StudyProtocolID, SubjectVisitInterviewResponseID, SubjectVisitInterviewItemID

Now it gives me
ResponseID, [StudyID], [StudyProtocolID], [SubjectVisitInterviewResponseID], [SubjectVisitInterviewItemID]

No matter how many times I press  Ctrl-B Ctrl-B  or click the drop down item.

Please fix it ☺
Doug

Best Answer

  • squigleysquigley Posts: 227 Gold 1

    Hello Doug,

    I was able to get further details from the developers on this and unfortunately they aren't able to dedicate time to fix this at the moment.

    If SQL Prompt is provided a script that is not close enough to a SQL query then we cannot ensure that it will be able to figure out what syntax elements the text represents, and thus formatting actions will not always be as desired.

    The suggested workaround would be to add enough syntax so that Prompt can understand what the list of columns are intended to represent similar to what was mentioned in the last post. I.e., instead of running "Remove square brackets" on

    [a], [b], [c]

    You could add text to make the script read

    select [a], [b], [c] from x

    and then run "Remove square brackets", which should remove the brackets as desired.


    Apologies again that there isn't a more straightforward fix at the moment, but I hope this helps.


    Thanks!

    Sean Quigley | Product Support Engineer | Redgate Software

    Have you visited our Help Center?





Answers

  • Hello Doug!
    Thanks for your inquiry and sorry to hear about your issue with SQL Prompt. I can confirm that I was able to replicate this issue on my end and I'll be sure to forward this over to the developers for further analysis. I'll be sure to get back to you with their thoughts.

    Sean Quigley | Product Support Engineer | Redgate Software

    Have you visited our Help Center?





  • OzzieOzzie Posts: 46 Bronze 5
    Excellent - RG Rocks!
  • Hello Doug,
    I was able to go back and forth with the developers on this. They've found that the issue only seems to occur if its just the list of columns. It works as expected when you expand it into a full SQL statement.

    For example:
    [EmployeeID],[ManagerID],[Gender]
    becomes
    EmployeeID,[ManagerID],[Gender]

    whereas 

    SELECT [EmployeeID],[ManagerID],[Gender] FROM HumanResources.Employee AS e
    becomes
    SELECT EmployeeID,ManagerID,Gender FROM HumanResources.Employee AS e

    Can you confirm if you're seeing this happen with statements on your end as well or just as a list of columns?

    Thanks!

    Sean Quigley | Product Support Engineer | Redgate Software

    Have you visited our Help Center?





  • OzzieOzzie Posts: 46 Bronze 5
    That is exactly what I see - but I use this all of the time - seems like an easy fix.
Sign In or Register to comment.