We help IT Professionals succeed at work.

create external table...

bbvic
bbvic asked
on
1,389 Views
Last Modified: 2013-12-18
when i just execute

CREATE TABLE ext_schoolof
....
....
REJECT LIMIT UNLIMITED;

, then it gets " select * from ext_schoolof "

BUT when i use procedure, it creates external table but when I try to get
" select * from ext_schoolof ", then I get errors

The error numbers are

ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "identifier": expecting one of: "double-quoted-string, hexprefix, newline, single-quoted-string"
KUP-01008: the bad identifier was: NEWLINEBADFILE
KUP-01007: at line 1 column 22
ORA-06512: at "SYS.ORACLE_LOADER", line 19

---

can you do me a favor how to fix?


CREATE OR REPLACE PROCEDURE test_external
IS
BEGIN
EXECUTE IMMEDIATE '
CREATE TABLE ext_schoolof'
|| '
( student_id VARCHAR2(7),
department_id VARCHAR2(1),
level_id VARCHAR2(1),
gender VARCHAR2(3),
major_id VARCHAR2(1),
advisor_id VARCHAR2(30)
)'
|| 'ORGANIZATION EXTERNAL'
|| '
(
TYPE oracle_loader
DEFAULT DIRECTORY test_schools
ACCESS PARAMETERS '
|| '
('
|| 'RECORDS DELIMITED BY NEWLINE'
|| 'BADFILE ''test_schools.bad'''
|| 'DISCARDFILE ''test_schools.dis'''
|| 'LOGFILE ''test_schools.log'''
|| 'FIELDS '
|| '
(
student_id (1:7) VARCHAR2(7),
department_id (8:1) CHAR(1),
level_id (9:1) CHAR(1),
gender (10:3) CHAR(3),
major_id (13:1) CHAR(1),
advisor_id (14:30) VARCHAR2(30)
)'
|| ')'
|| 'LOCATION (''test_schools_status.txt'')'
|| ')'
|| 'REJECT LIMIT UNLIMITED';
END test_external;
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Sean StuberDatabase Developer & Administrator
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2012

Commented:
Is this question still open?  Any other help needed?

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.