Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Loop through CSV file - Empty

User_F2C23Oct 10 2017 — edited Oct 11 2017

I created a folder on Oracle Server the path:

C:\Data2016\SourceNTFFor

Using the excellent article that is clear and explains the process.

https://paulzipblog.wordpress.com/2017/04/17/oracle-external-tables-part-1/

CREATE OR REPLACE DIRECTORY NTF_SOURCE_ORACLE AS C:\Data2016\SourceNTFFor';
-- directory NTF_SOURCE_ORACLE created.

GRANT READ, WRITE
ON DIRECTORY NTF_SOURCE_ORACLE
TO PUBLIC;

CREATE TABLE T_NTF_2017 (
NTF VARCHAR2(15)
)
ORGANIZATION external
(
TYPE oracle_loader
DEFAULT DIRECTORY NTF_SOURCE_ORACLE
ACCESS PARAMETERS
(
RECORDS DELIMITED BY 0X'0D'
SKIP 1
BADFILE 'NTF2017.bad'
LOGFILE 'NTF2017.log'
FIELDS TERMINATED BY ", "
(
NTF
)
)
LOCATION('NTF.txt')
)
PARALLEL
REJECT LIMIT 100;

I can see the Oracle directory (T_NTF_2017) and external folder (NTF).

pastedImage_0.png

copied from the Schema - Oracle directory and external folder

When I click on T_NTF_2017, don't get an error, I can see the table.

There are no records??

SELECT *

FROM T_NTF_2017

NTF

---------------

pastedImage_1.png

I thought that the external folder would allow me to query the text file (NTF.txt) using a SQL statement??

Seems that there is a step missing??

This post has been answered by Paulzip on Oct 10 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 8 2017
Added on Oct 10 2017
24 comments
1,060 views