Solved

SQL Loder

Posted on 2001-07-24
7
932 Views
Last Modified: 2008-03-10
I try to load a file in SQLLoader, but it gives me an error. Then when I try to change the file, I cannot have access to the file. Why is it so? Below is the things that I did. Thanks

$ loadInventory.sh

SQL*Loader: Release 7.3.2.2.0 - Production on Wed Jul 25 12:49:37 2001

Copyright (c) Oracle Corporation 1979, 1994.  All rights reserved.

SQL*Loader-350: Syntax error at line 5.
Expecting valid column specification, "," or ")", found "varchar2".
(CODE   position(01:08) varchar2,
                      ^
$ vi loadInventory.sh
"/ext1/app/oracle/product/7.3.2.2/tmp/Ex25775" Permission denied
0
Comment
Question by:rac13
7 Comments
 
LVL 2

Expert Comment

by:Kong
ID: 6316275
Instead of varchar2 use char
0
 
LVL 2

Expert Comment

by:ddandekar
ID: 6316278
For position based parameters for SQL Loader the column specification would be char and not varchar2.

Perhaps you can copy the .sh file in your directory and edit it before using.
0
 
LVL 2

Accepted Solution

by:
jbever earned 15 total points
ID: 6316287
Hi Rac13

SQLloader only knows CHAR, Integer external, Decimal external and DATA data types.

So you need to user CHAR instead of varchar2.

J.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:rac13
ID: 6316381
Now I had this error:

SQL*Loader: Release 7.3.2.2.0 - Production on Wed Jul 25 15:09:45 2001

Copyright (c) Oracle Corporation 1979, 1994.  All rights reserved.

SQL*Loader-350: Syntax error at line 5.
Expecting valid column specification, "," or ")", found "number".
QTY     position(15:19) number)
0
 
LVL 2

Expert Comment

by:jbever
ID: 6316390
as i mentioned before:

SQLloader only knows CHAR, Integer external, Decimal external and DATA data types.

so now go for the integer external.

jan.
0
 

Author Comment

by:rac13
ID: 6316443
Thanks, jbever had given me an answer closer to my problems so I decided to give hom the points. Thanks everyone. :)
0
 

Author Comment

by:rac13
ID: 6412050
Hi jbever,
 
  can we insert word directly using SQLLoader?
Example:
load Data
infile 'tepl_stock.txt'
APPEND into table EXCEPTION
(SKU   position(01:10) char,
QTY     position(18:24) integer external,
REASON char REASON = "Cannot find the cross-reference STMS stock-code")
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to recover a database from a user managed backup
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now