Automaticly set .sql filename equal to db name

[expired user #8853]'s profile image [expired user #8853] posted 9 years ago in Import/Export Permalink
It will be much faster to export data if HeidiSQL will automatically assign output filename like @table-name.sql

Please add this feature :)
kalvaro's profile image kalvaro posted 9 years ago Permalink
The syntax is %db, not @table-name ;-P

You can see the codes if you hover the arrow in the "Filename" drop-down box.
[expired user #8853]'s profile image [expired user #8853] posted 9 years ago Permalink
Yeah, but i need table name, when exporting only one table, not database name :)
ansgar's profile image ansgar posted 9 years ago Permalink
As there is no way to export one table per file, there is no variable for the selected table. Of course you can always select one table, but it does not make sense for the GUI to provide a variable which is invalid as soon as you select a second table, right?

We are talking about the SQL export in the "Table tools" dialog, right? Not the "Export grid rows" dialog, which just exports rows from a table view?
[expired user #8853]'s profile image [expired user #8853] posted 9 years ago Permalink
mm, if you right click on table and go to "export database as SQL" it will open dialog with name "Table tools"smileBut thats not the case, maybe it is possible to set table name as default filename while using right click on table, and if clicking on database or if multiple tables are selected - db name as default?!

ansgar's profile image ansgar posted 9 years ago Permalink
Well you can still select more tables per checkbox when you right-clicked a table.
kalvaro's profile image kalvaro posted 9 years ago Permalink

Yeah, but i need table name, when exporting only one table, not database name :)



Hmmm... I guess was mislead by the question title: Automaticly set .sql filename equal to db name.

If you choose "Output: Directory - one file per object in database subdirectories" you get proper file names automatically, you don't even have to use variables.

Please login to leave a reply, or register at first.