 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
ssandu
Joined: 26 Feb 2007 Posts: 95 Country: Romania |
|
Formating UPDATE command |
|
How can I change the format option for UPDATE command to produce code like this
UPDATE table
SET
field1 = @field1,
field2 = @field2,
etc.
Now after selecting the table it appears
UPDATE table
SET
field1 = ?,
field2 = ?.
etc.
Thank's
Sorin
|
|
Mon Nov 19, 2007 4:08 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I believe you are confusing code formatting, code auto-expansion and code snippets.
Theoretically the best way to do what you want would be to define a new "active" code snippet, for example, up and enter something like the following
 |
 |
DECLARE @$COLUMNS+TYPES$
UPDATE $OBJECT$
SET
$COLUMNS$ = @$COLUMNS$ |
So if you type up then press Ctrl+Enter, you get a prompt to choose table name, and after that you get the required update statement.
Unfortunately in the latest beta build we do not yet support active snippets in UPDATE and INSERT statements. This will be available sometime later.
|
|
Mon Nov 19, 2007 4:44 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
By the way, this technique can be already used for INSERT statements
 |
 |
INSERT INTO $OBJECT$
(
$COLUMNS$
)
VALUES
(
@$COLUMNS$
) |
And also by the way, if you don't want the UPDATE statement to be expanded you can either disable that particular feature or hold down the Shift key when selecting object name from a popup after UPDATE keyword.
|
|
Mon Nov 19, 2007 4:53 am |
|
 |
|
|
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
|
|
|