I have the following query to create a table however the file name is located on my local machine (as I don't have access to the Oracle Box) how can I use a local file to create a table on the Oracle Database). All the examples I have seen assume the file is located on the Oracle Database Server.
CREATE OR REPLACE DIRECTORY file_dir AS 'c:/temp';
GRANT WRITE ON DIRECTORY file_dir TO CPS_OWNER;
create table CPS_OWNER.TEMP_TOGGLE_LIST (
USER_ID varchar2(30)
)
organization external (
type oracle_loader
default directory file_dir
access parameters (records delimited by newline fields)
location ('users.csv')
)
reject limit unlimited;
Right click in SQL Developer on the Tables node in the connection tree.
Select 'Import Data'
Point to your CSV file.
Go through the wizard.
I talk about this in detail with screenshots here.
Or, watch the Movie.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With