Does anybody know how to store my tables to a csv file?

Hi

I'm using an oracle database... Lets call it databasename

My username and password are the same .... lets all that andrea/andrea

So I want to write a script to copy all the data from my table called tablename and store that data to a csv file called filename.

I cant seem to get any help for this, even by trying to look online

I'd use something like this:

sqlplus user/pass@sid << EOF
set colsep ';'
set lines 10000
set pagesize 0
set echo off
set feedback off
set trimspool on

spool /path/to/table.csv

select * from table;

spool off
EOF

I guess that's a basic task using sqlpus to connect, fire off your sql stament which would be a SELECT and then either use some switch of sqlplus to define an output file or just redirect it to an output file. There should be plenty of examples on the web. Strange you did not find any.

My 1st result on Google entering "sqlplus script":
http://www.orafaq.com/wiki/SQL*Plus_FAQ