If you're just trying to put a line between every line after you've exported your file then one solution would be to create macros in Excel. By tweaking your auto-generated macros code with VBA in Excel you can automate all the process and use the same solution in the future with a click of a button.
But if you're familiar with programming languages then it might be much more easier to manipulate your files in scripting languages such as Python etc..
*CSV files are seperated by commas hence "comma seperated values."
I have to import an external csv file into a table in database each
day.
...
Additionally, It is much appreciated if the importing could be done
entirely without the need for GTTs and loading a file straight into
the destination table.
And that is what SQL*Loader was made for.
SQL> create table employee
(
id integer,
name varchar2(10),
dept varchar2(15),
salary integer
);
$ cat employee.csv
100,Thomas,Sales,5000
200,Jason,Technology,5500
300,Mayla,Technology,7000
400,Nisha,Marketing,9500
500,Randy,Technology,6000
501,Ritu,Accounting,5400
$ cat load.ctl
load data
infile 'employee.csv'
append
into table employee
fields terminated by ","
( id, name, dept, salary )
Load data into empty table:
$ sqlldr user/password@database control=load.ctl
SQL> select * from employee;
ID NAME DEPT SALARY
---------- ---------- --------------- ----------
100 Thomas Sales 5000
200 Jason Technology 5500
300 Mayla Technology 7000
400 Nisha Marketing 9500
500 Randy Technology 6000
501 Ritu Accounting 5400
Append data (notice the append
keyword in load.ctl
):
$ sqlldr user/password@database control=load.ctl
SQL> select * from employee;
ID NAME DEPT SALARY
---------- ---------- --------------- ----------
100 Thomas Sales 5000
200 Jason Technology 5500
300 Mayla Technology 7000
400 Nisha Marketing 9500
500 Randy Technology 6000
501 Ritu Accounting 5400
100 Thomas Sales 5000
200 Jason Technology 5500
300 Mayla Technology 7000
400 Nisha Marketing 9500
500 Randy Technology 6000
501 Ritu Accounting 5400
Best Answer
The file is read whenever the foreign table is scanned, which can happen several times during processing of a query.
There is no caching except the file system cache of the operating system.