Reputation: 21
I am trying to run the export command in SQL Developer. I get the error message "Unknown Command". Searching the web, I am told by many to run catexp.sql
. I don't have that file, and I don't know how to download it. Can anyone help me run this command? How do I find catexp.sql? Using the export functionality is not a feasible option since I must run the code below about 80 times.
exp username/password direct = y file = C:\mypath\mydata.csv tables = TABLE.TABLENAME query =\"Where rownum\<=5000000\"
Thanks in advance.
Upvotes: 2
Views: 3706
Reputation:
exp
is a commandline program, not a SQL command.
You cannot run that from within any SQL client (including SQL Developer).
Additionally exp
is somewhat deprecated anyway and you should use DataPump in order to export your data.
DataPump can be accessed through SQL using the dbms_datapump
package and will write the dump file into a directory on the server.
dbms_datapump
is documented extensively in the manual
There are also several examples available:
Upvotes: 1
Reputation: 10452
You can just write a query in SQL Developer:
select /*csv*/ * from tableName
Then copy/paste the results to a new file.
This question How to export query result to csv in Oracle SQL Developer? also has several other suggestions.
Upvotes: 0