Data Statements - formatting with INSERT statement
webrunner
Posts: 28 Bronze 1
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:
Is there an option to have the query look like this, with both INSERT and SELECT columns more than 1 to a line?
I tried looking at the options for Data Statements but can't get it to work.
Thanks for any help.
- webrunner
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:
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?
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
Comments
In SQL Prompt 5 > Options > Data Statements
Uncheck "Each subsequent column" in New lines.
Product Support
Red Gate Software