Auto-create Select Into Code From Table Selection in Query
EdCarden
Posts: 138 Silver 2
This may already exists and i simply am unaware of it. If I have a query like this:
SELECT Col1,Col2,Colx FROM TABLEA A
Is it possible with SQL Prompt to select the table name and with the click of a mouse button auto-create an INSERT statement for TABLEA?
I know that SQL Server Mgt Studio will create this if you have the table selected in the Object Explorer pane but I'd love to be able to highlight a table name in a query and single-click to get the same.
Thoughts?
SELECT Col1,Col2,Colx FROM TABLEA A
Is it possible with SQL Prompt to select the table name and with the click of a mouse button auto-create an INSERT statement for TABLEA?
I know that SQL Server Mgt Studio will create this if you have the table selected in the Object Explorer pane but I'd love to be able to highlight a table name in a query and single-click to get the same.
Thoughts?
Tagged:
Answers
Not exactly, there is a default SQL Prompt snippet to add an insert statement. After entering your query:
SELECT Col1,Col2,Colx FROM TABLEA A
then type ii this will bring up the default SQL Prompt snippet INSERT INTO.
Further information on the snippet feature in SQL Prompt can be found here. Also if you open SQL Prompt menu on the toolbar and select the Snippet Manager option towards the bottom on the menu.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com