SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Code snippet question

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Code snippet question
Author Message
ssandu



Joined: 26 Feb 2007
Posts: 95
Country: Romania

Post Code snippet question Reply with quote
I have the following cose snippet
INSERT INTO $OBJECT$
($COLUMNS$)
SELECT $COLUMNS$
FROM $OBJECT$
WHERE |
When I run this and I select a table I get
INSERT INTO table
(col1, (col2, (col3)
SELECT col1, col2, col3
FROM table
WHERE
How can I write this code snippet to get fields from insert command like (col1, col2, col3)
and to select another table in the select command.
Again I have to say that writing and saving Code snippets in SQL Assistant under Vista requires to run it AS Administrator.
Thank's

Sorin Sandu
Romania
Sun May 04, 2008 3:20 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7840

Post Reply with quote
Just add spaces before and after the bracket.

Note that anything that goes immediately before or after macro variable is considered as a prefix and repeated for every value, for example, if you want to create list of variables with names matching column names you can enter that as @$COLUMNS$.

Anyway what you need is below.


Code:
INSERT INTO $OBJECT$
( $COLUMNS$ )
SELECT $COLUMNS$
FROM $OBJECT$
WHERE |

Sun May 04, 2008 10:32 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.