Home » SQL & PL/SQL » SQL & PL/SQL » 8i Organization external error when creating table from unix script
8i Organization external error when creating table from unix script [message #221399] Mon, 26 February 2007 10:09 Go to next message
adminme
Messages: 31
Registered: May 2006
Member
I don't understand why I'm receiving this error or the crazy output. the script is below.


SQL*Plus: Release 8.1.7.0.0 - Production on Mon Feb 26 10:06:47 2007

(c) Copyright 2000 Oracle Corporation. All rights reserved.

Connected.
SQL> SQL>
Table dropped.

SQL>
Directory created.

SQL> 2 3 4 5
Table created.

SQL> SP2-0734: unknown command beginning "organizati..." - rest of line ignored.
SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 type oracle_loader
*
ERROR at line 2:
ORA-00928: missing SELECT keyword


SQL> Name Null? Type
----------------------------------------- -------- ----------------------------
LOG_MSSG VARCHAR2(500)

SQL>
no rows selected

SQL> SQL> SQL> SQL> SQL> Disconnected from Oracle8i Enterprise Edition Release 8.1.7.4.0 - 6



HERE IS THE SCRIPT:

#!/bin/ksh

cd $ORACLE_HOME/bin

sqlplus /NOLOG @/dir1/dir2/dir3/dir4/uname.sql <<END

drop table table_name;
create or replace directory test_dir as '/dir1/dir2/dir3/dir4/test_dir';

create table
schema.table_name
(
log_mssg varchar2(500)
);
organization external
(
type oracle_loader
default directory test_dir
access parameters
(
records delimited by '|'
fields terminated by ','
(
log_mssg
)
)
location ('rmlogfile.csv')
)
reject limit 50;
Re: 8i Organization external error when creating table from unix script [message #221452 is a reply to message #221399] Mon, 26 February 2007 20:52 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
Aren't externally organised tables a 9i feature?

Ross Leishman
Re: 8i Organization external error when creating table from unix script [message #221453 is a reply to message #221399] Mon, 26 February 2007 21:01 Go to previous messageGo to next message
BlackSwan
Messages: 25037
Registered: January 2009
Location: SoCal
Senior Member
>);
>organization external
IMO, the semicolon in the top line of this post is likely misplaced.
Re: 8i Organization external error when creating table from unix script [message #221590 is a reply to message #221399] Tue, 27 February 2007 10:00 Go to previous messageGo to next message
adminme
Messages: 31
Registered: May 2006
Member
Thanks for your replies. I've tried removing the semicolon with same results. Although I thought external tables were supported in 8i I wonder because this is very straightforward and error is always the same.

I will check it out more as someone says it should work.

Any thoughts on another approach for bringing flat file data into an oracle table on schedule? This is a very small daily load.

thanks
Re: 8i Organization external error when creating table from unix script [message #221608 is a reply to message #221590] Tue, 27 February 2007 12:06 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
SQL*Loader (sqlldr). As Ross said, external tables were a 9i new feature.
Re: 8i Organization external error when creating table from unix script [message #221615 is a reply to message #221399] Tue, 27 February 2007 13:12 Go to previous message
adminme
Messages: 31
Registered: May 2006
Member
thanks a lot - I'll go with that
Previous Topic: Passing Resultsets to Java - Urgent
Next Topic: doubt using whenever sqlerror exit
Goto Forum:
  


Current Time: Mon Dec 05 11:15:17 CST 2016

Total time taken to generate the page: 0.15694 seconds