Are you trying to export the table definitions to flat files or the data? Since you are talking about CSV files, I will assume you want the data.
There is no point and click way to do what you want to do. You have to:
- Open a tab
- Type SELECT * FROM
- Execute the query
- In the results tab, do a File->Save As and select CSV
WARNING: Do NOT try this on tables with more than a few thousand rows.
RapidSQL is not the correct tool to do this with nor is any other GUI query tool. They are designed to display data in a friendly format; not handle mass quantities.
The best way to do this is to use the Sybase utility called Bulk Copy (BCP). You can extract the entire contents of a table to a CSV very quickly and efficiently at something like 10,000 rows per second.
You can use RapidSQL to run a query that generates a script file with all the BCP command lines you need to get all the tables. Something like the snippet below. It may not be completely correct as I don't have a way to test it right now.
Run the query below in a RapidSQL tab for the database you are interested in. Then save the results as a Tab Delimited file with an extension of '.bat', assuming Windows of course.
When you run the script, make certain you are both in the directory where you want the extracted files to be placed AND that there is enough disk space to hold them. If you have a 10GB database, you may need that much file system space.
Regards,
Bill
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
|
begin
set nocount on
declare @bcp_prefix varchar(128),
@bcp_postfix varchar(128)
select @bcp_prefix = 'bcp ' + db_name() + '..',
@bcp_postfix = '.csv -c -t, -S -U -P'
select @bcp_prefix + name + ' out ' + name + @bcp_postfix
from sysobjects
where type = 'U'
end
|
Open in New Window
Select All