Unresolved Alias

SchnurdleSchnurdle Posts: 3 Bronze 1
edited February 25, 2016 6:03AM in SQL Prompt
Hi,

I'm on the latest stable version of SQL Prompt, but getting a strange behaviour.

When the cursor is more than 3000 characters above the definition of an alias (in the field list, for example) the suggestions menu does not include the alias.
Hovering over a field referring to the alias within the 3000 characters and the tooltip displays, e.g. "r (Table)".
More than 3000 characters away and the tooltip for the same alias displays "Unresolved alias (Table)".

Please advise.

Comments

  • Aaron LAaron L Posts: 596 New member
    Hi Schnurdle,

    Could you try editing the following file in notepad:
    %localappdata%Red GateSQL Prompt 7RedGate_SqlPrompt_Engine_EngineOptions.xml
    
    And see if increasing the <ParserLookAheadDistance> variable to a larger value helps?

    Thanks,
    Aaron.
  • Thanks Aaron.

    I was spot on with the 3,000 characters!
    Upped it to 30,000.

    Why would it be set so low by default?

    Can I suggest you add this parameter (just about the only one missing!) into the Options GUI in a future version?
  • Aaron LAaron L Posts: 596 New member
    Hi Schnurdle,

    We'll look into improving (possibly removing) this setting in an upcoming release of Prompt.

    It's a bit of a left over from earlier versions of Prompt that didn't calculate suggestions asynchronously (and could slow down typing if it was set too high!). Bumping it up to 30,000 should be ok, but if you notice the suggestions lagging behind your typing you should decrease the value.

    Thanks,
    Aaron.
  • levenyulevenyu Posts: 1 New member
    Hello folks,
    I have the latest version of SQL Prompt v. 9.4.5.7296 and I updated that XML file to the following:
    <ParserLookAheadDistance>500000</ParserLookAheadDistance>
    and it is still not working. Please advise. Thanks.
Sign In or Register to comment.