I need to export data from a table containing around 3 million data. The table has 9 columns and is in the following format:
Source | Num | User | Offer | Simul | Start_Date | End_Date | Label | Value
coms p | 0012| plin | synth | null | 04-JAN-15 | 31-JAN-15| page v | 8
However when I am opening the csv file using notepad++ only around 600 000 lines are displayed and the display is as follows:
coms p ,12,plin ,synth , ,04/01/2015 00:00:00,04/01/2015 00:00:00,page v
8
As you can see there are lots of spaces in some fields despite having none in the field in the table, the 0012 value of Num field is displayed as 12 and the last field is on another line.
What's more is that there is an empty line in the csv between 2 rows of the table.
Any idea of how to make those useless spaces disappear, and how to display the whole row data in a single row in the csv, how to make the 00 appear for the Num field and why is it that only 600 000 is being displayed in Notepad++? I read that there is no row limit for csv files.
The sql I am using is below:
SET SQLFORMAT csv
SET HEAD OFF
spool /d:/applis/test/file.csv
select * from TEST;
spool off;