|
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
judahr
Joined: 09 Mar 2007 Posts: 319 Country: United States |
|
Feature: Insert Helper |
|
When you are inserting a bunch of fields in a table, it would be nice if the popup would tell you the field you are inserting into. Example:
|
|
Insert dbo.Table1( Field1, Field2, Field3, Field4)
Select |
At this point, one of the columns that could be added is something that says Field1. Once you are on the next column, show Field2. And so on.
|
|
Mon Oct 25, 2010 9:40 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7907
|
|
|
|
SQL Assistant currently supports column hints in INSERT..VALUES statements. I don't think INSERT ... SELECT can be handled in the same manner, because the priority after SELECT keyword is set for the tables/views referenced in the SELECT statement, not the table referenced in the preceding INSERT.
You most likely know that already, but just in case, please try choosing table name in the popup appearing immediately after INSERT keyword, SQL Assistant will generate the entire statement for you, including all the columns. In the generated code, replace VALUES with SELECT and you get almost what you described, all the columns. To quickly uncomment columns you want, highlight the block of code containing column names and press Ctrl+\
Last edited by SysOp on Mon Oct 25, 2010 6:28 pm; edited 1 time in total |
|
Mon Oct 25, 2010 10:20 am |
|
|
judahr
Joined: 09 Mar 2007 Posts: 319 Country: United States |
|
|
|
Yes, I know about the insert auto-output everything. This is for more complex inserts with tons of columns. My idea would be to detect you are in an insert while in the select. Then append a column to the field popup that shows the column name you will insert into.
Btw, that auto-output everything doesn't seem to work reliably. For example, if you type the first few characters of the tables (so you can find it), then click tab, doesn't output. Seems to only work when you use the arrow keys.
|
|
Mon Oct 25, 2010 11:01 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7907
|
|
|
|
Does it work when you are you using Enter key? There needs to be something selected the popup list before you can pick it. Tab key is a not a best choice for that, it doesn't change any selection.
|
|
Mon Oct 25, 2010 6:32 pm |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|