SqlPrompt doesn't understand the Syntax of an update-statement when the table-to-be-updated is aliased
Hi!
Please consider this statement
update t1
set t1.value = t2.value
from Table1 t1
join Table2 t2
on t1.ID = t2.ID
When you have the cursor in the set-block of the statement, SqlPrompt doesn't know what 't1' means and which columns t1 has.
![](https://secure.gravatar.com/avatar/7cbc1ad1a35f8df12da412005dfdd64b?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
This is included in SQL Prompt 6.4, which you can download from http://www.red-gate.com/products/sql-development/sql-prompt/
-
Aaron Bauman commented
To clarify a bit: if you type in "t1." you do not get a list of the columns.
However if you leave off the "t1" and just hit [space] after "SET" it will give you a list of the appropriate columns.
I think it should give you the list of columns when hitting "t1" -
Nicholas Orlando commented
Seems to work just fine for me. Only time it doesn't work is when there is a syntax error earlier in the query or if the table being updated is a temp table and SQL Prompt can figure out the definition of the table. EX: SELECT * INTO #MyTempTable FROM MyTable