Comments
6 comments
-
I'll see what I can do about keeping the table hints with the table name
-
Thanks Aaron!
-
Hi Klaus,
I've just updated our beta to 6.3.0.65 which should include this and a fix for the semicolon bug you reported. You can download it from the same URL as before. -
Aaron,
thanks for the new version. It's partially working: It seems that we have a semicolon issue here again.
If the ii snippet is defined asINSERT INTO $CURSOR$ WITH (TABLOCK)
it gets correctly expanded toINSERT INTO TableName WITH (TABLOCK) (ColumnName) VALUES (0 -- ColumnName- smallint )
However, if the snippet is defined asINSERT INTO $CURSOR$ WITH (TABLOCK);
(note the trailing semicolon) and I start typing ii+TAB: this leads toINSERT INTO | WITH (TABLOCK);
(The pipe indicates the cursor position) So everything is fine until now. But after choosing a table name, the generated code gets replaced by:INSERT INTO TableName (ColumnName) VALUES (0 -- ColumnName- smallint )
...the table hint and the trailing semicolon are missing after full generation of the code. -
Ok, one more try with 6.3.0.70
This build should keep the tablehint with the name and place the semicolon after the autogenerated code.
-
OK, 6.3.0.70 fixes that one. Thank you!
Add comment
Please sign in to leave a comment.
I mentioned it in my diary study yesterday: Is it possible to create a snitppet for INSERT INTO CursorHere WITH TABLOCK ?
When defining INSERT INTO $CURSOR$ WITH TABLOCK it expands to:
rather expanding to
Since we want to use minimally logged inserts (trace flag 610 is on), we have to use WITH (TABLOCK) very often.