SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Formating UPDATE command

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Formating UPDATE command
Author Message
ssandu



Joined: 26 Feb 2007
Posts: 95
Country: Romania

Post Formating UPDATE command Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
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

Code:
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7838

Post Reply with quote
By the way, this technique can be already used for INSERT statements

Code:
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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.