SqlDbx
You are not logged in.
Pages: 1
Hi,
I am a SQLDBXPro users and I can not find a way to send the results of a sql request directly to a file output.
CSV, Excel, TXT what ever.
That could be really usefull for extract of large amount of data.
Is their any way to perfom such operation ?
Thx,
Antoine
Offline
I am not sure what you mean by directly to a file.
You can right click in result grid and select "Export to" option.
If you are looking for automatic export to a file without displaying results than this will be implemented in a one of the next releases.
Also currently you can do following to export results to excel automatically:
select * from table_name
go
cmd export = excel
Offline
Yes I am trying to export to a file without displaying the results. Very usefull when working on large amount of data.
Thx for the cmd export = excel
Offline
Can someone provide an example of how to use the cmd statements?
Do I place them after my SQL statement?
I am getting:
SQL command not properly ended.
For simplicity lets jsut say my SQL is:
SELECT *
FROM Table1
Where would i stick:
"GO
CMD EXPORT = Excel" ?
Offline
The below should work for Sybase and MS SqlServer
SELECT * FROM table
go
cmd EXPORT = Excel
Please not that currently you have to select all three lines above and then execute.
Offline
thanks is there a way to do this for Oracle?
Offline
Sure. Replace go with ;
Offline
The SQL now runs but i get "ORA-00900: invalid SQL statement" on cmd EXPORT = Excel
I am using 3.46 Pro, could I possibly be using an old version that doesnt support this?
Offline
That is the problem. You need at least 3.47 for this to work
Offline
But is their a way to achieve the same without displaying the results in the result tab ?
Offline
Not in a current version. There will be changes to this feature in one of the next releases
and it will be possible to export results without displaying them first.
Offline
great thx
Offline
Do you know when it will be delivered ?
Offline
This feature is available now.
http://www.sqldbx.com/Help/scr/html/ScriptCommands.htm
Offline
Good to know but I might be missing something.
How should it be used ?
When I run the following:
cmd export = "C:TEMPCache est.csv"
select top 100 * from client
Nothing happens.
What am I doing wrong ?
Offline
This is how it should be done:
cmd export = file C:TEMPCache est.csv
select top 100 * from client
Please note that both lines have to be executed as one batch
Offline
It works thanks !
I was wondering, could it be possible to link the cmd to a shortcut (like F6 or anything) that would automatically export the data to a predefined folder using a standard file name and time stamp ?
That would easier to use and would be I think a great improvement.
Offline
Any news about this ?
That would be really use full on a daily basis.
Offline
I am not sure I understand what you mean by linking cmd to shortcut
Offline
Well running the cmd command is a little bit painfull.
What would be perfect for example is to be able to select a query and instead of running ctrl + e to execute it use ctrl + k for example and directly run the request into a file.
Is it more clear ?
Offline
So is it more clear ?
Offline
Yes it is, but I am not sure why would you need another shortcut for this.
Offline
is there already a shortcut ?
I only know the use of a command (ie: cmd export = file C:TEMPCache est.csv) before the script execution to have the output directly sent to a file and this is quite painful.
Offline
I am not sure what is not right with the way it currently works. Why adding a shortcut makes it easier. Should results go to Excel of File?
If to a file what should be the file name? What if you want results of multiple queries saved to a file? I do not see any easy way to configure something like this.
Offline
Pages: 1