Red Gate forums :: View topic - Data Statements - formatting with INSERT statement
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 5
SQL Prompt 5 forum

Data Statements - formatting with INSERT statement

Search in SQL Prompt 5 forum
Post new topic   Reply to topic
Jump to:  
Author Message
webrunner



Joined: 19 Apr 2011
Posts: 9

PostPosted: Tue Apr 09, 2013 9:16 pm    Post subject: Data Statements - formatting with INSERT statement Reply with quote

Hi,

I want to format an INSERT SQL statement with a SELECT statement (not a VALUES statement) without having each column on a new line.

When I highlight the code and choose Format SQL, it puts multiple SELECT statement columns on one line but not the INSERT statements.

For example:
Code:

INSERT INTO MyTable ([col1],
[col2],
[col3],
[col4])
SELECT col1, col2,
col3, col4
FROM MyOtherTable


Is there an option to have the query look like this, with both INSERT and SELECT columns more than 1 to a line?
Code:

INSERT INTO MyTable ([col1], [col2],
[col3], [col4])
SELECT col1, col2, col3, col4
FROM MyOtherTable


I tried looking at the options for Data Statements but can't get it to work.

Thanks for any help.

- webrunner
Back to top
View user's profile Send private message
Manfred.Castro



Joined: 23 Apr 2012
Posts: 205

PostPosted: Wed Apr 10, 2013 11:57 pm    Post subject: Reply with quote

Can you try the following.
In SQL Prompt 5 > Options > Data Statements
Uncheck "Each subsequent column" in New lines.
_________________
Manfred Castro
Product Support
Red Gate Software
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
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