How can we help you today? How can we help you today?

Transact SQL & SQL Prompt

Hi There

I've been trialing SQL2005 client dev tools & SQL prompt together and am finding it very difficult to use SQL prompt.

It could be that we code in a weird and wonderful way but I'm having the following issues:

1, Table aliases. These only seem to bring up intellisense properly if used on joins between permanent tables. Using table aliases on temp tables on functions does not seem to give any intellisense. e.g.
table1 t1 inner join table2 t2 on t1.blah = t2.blah
..is fine, the column list pops up after typing t1 and t2.
table t1 inner join function f1 on t1.blah = f1.blah
table t1 inner join @TableVariable v1 on t1.blah = v1.blah
.. not ok, f1/v1 brings up no intellisense

2, Related to aliases again, I'm having issues using table aliases on WHERE and GROUP BY and so on. Pressing space after the keyword immediately brings up a list of tables. Pressing tab (as you would, when staggering code) inserts the first thing on the list.. argh! If amending an existing query, table aliases don't bring up intellisense for permanenent tables. If I want to use an alias it only seems to work when writing a new query which does not use functions or temp tables.

2, Shift+Home do not highlight my current row if intellisense word list is up.

3, It'd be nice if there were an option to make Spacebar complete the currently selected word (like in vb6). I appreciate that some companies may use table names etc with spaces but we do not.

4, I'd very much like an option such that SQL Prompt only suggests a list of words when I press ctrl+space (again, same as vb6!)

As you've probably guessed, the only intellisense we've used to date is from.. vb6! Hence the requests.

A final note about aliases.. how I'd expect them to work;

SELECT
FROM TABLE t1
INNER JOIN @TableVar v1 on t1.(cols in t1) = v1.(cols in v1)
GROUP BY v1.(cols in v1)

.. in each case I press ctrl+space to get wordlist

not;

SELECT
FROM TABLE t1
INNER JOIN @TableVar v1 on t1.(cols in t1) = v1.(nothing)
GROUP BY (table name list) v1.(nothing)

nb @TableVar could also be a function, same issue.
JRMorris
0

Add comment

Please sign in to leave a comment.