No Intellisense after temporary mistake

buckleybuckley Posts: 69 New member
edited March 6, 2014 11:43AM in SQL Prompt
Another report. I keep them coming if you don't mind

====
DROP TABLE Temp
CREATE TABLE Temp (col1 INT)

SELECT
*
FROM
Temp t
WHERE
1 = 1
AND t. -- *
AND t.col1 = 6
AND t. -- no intellisense
====


The reason is the error in the line marked with *

That's understandable and now that I use prompt a few weeks I know how to correct it. But that's after a few weeks. Of course I thought (without good reason!) prompt was malfunctioning.

It's arguable that prompt can be made more robust against these errors because they come in many forms and are make up the most part (80-90%) of cases where I expect prompt to give it suggestions but doesn't.

I leave it to you of course if you think this should be in scope. I think a competitor highlights syntax errors in real time which can help the user to correct his statement before executing.
If I format the sql with prompt the red scribbles also show where the syntax error is. So prompt has the capability but does not show it real time.

Comments

  • Aaron LAaron L Posts: 596 New member
    I think this is a common enough use case that we want to fix it, and it looks like a single fix could resolve all 3 of your posts.

    For the error highlighting, interestingly enough it looks like there's a option for it by changing MarkSyntaxErrors to true in "%localappdata%/Red Gate/SQL Prompt 6/RedGate_SQLPrompt_CommonUI_Options_UIOptions.xml". I guess we never got the feature to a state where we were happy enough with it to expose it through the UI, but you can give it a go if you'd like?
  • buckleybuckley Posts: 69 New member
    Good news you think fix will take care of all. Let me know if you need a tester
  • buckleybuckley Posts: 69 New member
    I'm currently developing with the feature enabled. First impression is that its helpful and working as expected. I'm curious if its scales and keeps on behaving. I'll report back.
  • buckleybuckley Posts: 69 New member
    fixed with build 6.3.0.235. Thanks Aaron!
  • buckleybuckley Posts: 69 New member
    edited March 6, 2014 5:36PM
    The last month or so I have been using prompt with the "show errors" feature enabled.

    It helps in quit a few situations and it performed well.
    Observing the part that was highlighted helped me to see a problem before executing the query( like resharper if you use Visual Studio) and thats a real productivity boost. It also made me see why prompt could not provide suggestions with intellisense giving the user a clue as to why the tool behaves a certain way.

    A quick win to make it more attractive / less intrusive : only put red squiggles on non whitespace characters. If you have big sql statement it sometimes takes the whole screen with the squiggles.

    Example image http://postimg.org/image/ma915t5cx/
  • Aaron LAaron L Posts: 596 New member
    Thanks for the feedback :) I agree that the whitespace being highlighted isn't particularly helpful and looks pretty ugly. I'll have a look into seeing if we can restrict the squiggles to non-whitespace characters (or at least trim the start/end of each line)
Sign In or Register to comment.