Is it possible to export the result of a query directly into a new database table ?
Thanks.
Is it possible to export the result of a query directly into a new database table ?
Thanks.
Unfortunately no, you cannot export the result of a query directly into a new database table from our Query Builder. Here are two workarounds:
Inside the SQL Editor window, manually type in an
insert into table_name (column1, column2, column3 …) in front of the select statement, and then execute the INSERT … SELECT … statement
Please let us know if this works for you.
I thought this would be a good feature when we were first designing Toad for Data Analysis. But we did not add it because it did not seem to be something needed by our Beta users and test cases.
But since you have made this request I have now added this enhancement as CR0224714. We have all the tools to do this so we can add to version 2.0.
There is one feature that is added that I think is pretty cool. When importing we now offer creating a new table for the data on the fly. You do not have to make the extra step of creating the table. It is a simple table of just vchars. But I find many use cases where this is quite handy.
Debbie
Also on some database you can simply prepend the query (If you send it to the editor) with:
create table {tablename} as {select statement}
This will create the table and insert the result of the select into it.
Create table NewTable as select * from existingTable