Toad World® Forums

Export Dataset: Insert Statements - Automatic Schema and Name Logic


#1

With Export Dataset window, when setting the Export Format to “Insert Statements”, the screen always defaults to “Automatically detect schema and name”. It would be nice if the tool could remember my preference to not automatically remember the schema name. One way to implement this would be to change the Check Box to a Radio Button, and add two selection options of: “Automatically detect name” or “No Automatic Detection”. In this way, my preference of “Automatically detect name” could be defaulted eliminating a manual step.

Thanks,

David


#2

Do you find that most or all of the time when you want it unchecked, there is a join in the source query? I’ve sometimes thought that we’d be better off leaving it unchecked in those cases. Just wondering if such a change would solve the problem without introducing another GUI element into an already crowded window.


#3

Normally, I am querying only one table. As I am normally in the editor window, it is easier for me to write a select query and then export the selected rows as insert, rather than going into schema browser to export the data.

I am doing this for the purpose of creating the insert statements to be run in about 5 other schemas in other databases. Unfortunately, they all have different schema names… so I always remove schema owner and leave the table name.

Thanks,
David


#4

I see, makes sense. I’ll take a look at that.

By the way, I know you said that you’re usually already in the Editor, but your inserts will go a lot faster with SB-Tables -> rt-click -> Data -> Copy to another schema. That copies the rows in batches of 500, by default (as long as there aren’t blobs/clobs, etc).


#5

Thanks and thanks for the suggestion. The inserts are required to be in script form so that it can be “code reviewed” and then migrated into the next environment through another tool. So I can’t use the “Copy to another schema” feature.

Thanks again,
David


#6

I just tried this - it’s true that “Automatically detect schema and name” puts the schema name in the edit box, but if the “include schema name” checkbox (which is remembered) is unchecked, then the schema name does not make it into the insert statements. So I think you can just uncheck that box and then you won’t have to mess with editing out the schema name each time.


#7

I just tried that with the latest beta 13.1.0.48, and the schema name was placed into the insert statements. I then tried it again, and the checkbox was again “checked”.

David


#8

hmm… I also used latest beta. For me, the “include schema name” is being remembered and controlling the presence of schema name in the insert statements. I wonder what’s going on…


#9

So, you’re just doing this, right? (I have clipboard checked in this screenshot, but clipboard/file shouldn’t make any difference)


#10

Thank you, and I am truly sorry… I was only working with the “Table” section at the bottom and didn’t even see the checkbox for the schema name. This resolves my issue.

Thanks,

David


#11

No problem. It’s a busy window. That “include schema name” checkbox should maybe be a bit closer to the schema edit box anyway. I’m glad it’s resolved.


#12