If I start writing a query at the FROM clause, and enter a base table, then add a join clause (to a local table) and alias that table using the keyword AS, the alias is not available in the list of candidates until it is dereferenced in the SELECT clause. This is highly annoying behavior.

Ex.:
1.

SELECT

FROM
[Company] AS c
INNER JOIN [Company] AS p ON

2.
Whilst cursor is one space to the right of ON on INNER JOIN line type p. p will not be listed as a candidate.

3.
On blank line between SELECT and FROM type p. and select a candidate from the list.

4.
After ON on INNER JOIN line type p. You now have correct candidate list.

5.
Undo steps 4 and 3.

6.
Whilst cursor is one space to the right of ON on INNER JOIN line type p. p will not be listed as a candidate- AGAIN!
waco_huber
0

Comments

1 comment

  • Bart Read
    Hi there,


    As documented in the online help SQL Prompt may not provide correct auto-complete suggestions where syntax errors exist in your SQL. "SELECT FROM" is one such error. The best thing to do is make sure you always start your queries with "SELECT * FROM" and specify the column list, either manually or using the column picker, once you've completed the FROM clause.

    There is an ssf snippet that will insert "SELECT * FROM" quickly, and you can obviously edit this if you want to break it onto more than one line. You'll find the snippet editor in the Options dialog under SQL Prompt > Options from your editor's main menu bar.

    Hope that helps.


    Thanks,
    Bart
    Bart Read
    0

Add comment

Please sign in to leave a comment.