Update Statement Column Predictions Are Wrong
bunyamin
Posts: 3 New member
in SQL Prompt
Hi,
When I use table aliases on update statements, first column predictions comes with non-aliased table names.
An example:
When I try to add Where text, first column predictons are as in the picture.
Also same thing happens after "set ".
In this case, columns with no table aliases can not be used. Because tables have aliases.
Prompt Version : 8.2.5
When I use table aliases on update statements, first column predictions comes with non-aliased table names.
An example:
Drop Table If Exists #Table1 Create Table #Table1 (Col1 int, Col2 int) Drop Table If Exists #Table2 Create Table #Table2 (Col1 int) Update T1 Set T1.Col2 = 1 From #Table1 T1 INNER JOIN #Table2 T2 On T2.Col1 = T1.Col1
When I try to add Where text, first column predictons are as in the picture.
Also same thing happens after "set ".
In this case, columns with no table aliases can not be used. Because tables have aliases.
Prompt Version : 8.2.5
Tagged:
Best Answers
-
way0utwest Posts: 312 Rose Gold 1I get that the alias isn't appearing first, which seems like a problem. however, the columns with the alias appears just below the item you've boxed in. If you arrow down3 times, you'll have t1.col1. I think this is a sorting issue with the product. I'll report this.Editor, SQLServerCentral
-
Tianjiao_Li Posts: 684 Rose Gold 5Hi @bunyamin
Thanks for your patience with this issue.
I'm sorry to let you know that the development team hasn't been able to prioritise this work. Although we aim to fix all bugs, but given the size of the backlog of higher-priority items, it doesn't look like it's something we will fix in the foreseeable future. However we still have it logged as SP-6713 in our internal bug tracking system and we'll reassess it again in the future.
Sorry for the inconvenience caused.
Answers
Thank you for reporting this. I've managed to reproduce the issue locally and it does indeed look like a sorting issue @way0utwest, as it's probably better to sort the aliased columns first.
I've logged a bug (reference: SP-6713) to track it.
Best regards,
Frederico
Redgate Software