Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL*Loader error: What is wrong here?

RE: SQL*Loader error: What is wrong here?

From: Ian Cary (C) <Ian.Cary_at_ordnancesurvey.co.uk>
Date: Thu, 10 Nov 2005 08:23:15 -0000
Message-ID: <4AA808D68343824E8891632BD448AE6B1BEC11@OSMAIL.ordsvy.gov.uk>


If the control file you posted is complete it looks as if you are missing the column mappings (i.e. the column names in INBOUND which correspond to the comma delimited data in your i*.txt file). The control file should look like  

LOAD DATA APPEND INTO TABLE INBOUND FIELDS TERMINATED BY "," TRAILING NULLCOLS (col1,

 col2,

....

 coln)  

Hope this helps  

Cheers,  

Ian        

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Madhavi Kanugo Sent: 09 November 2005 17:11
To: 'oracle-l_at_freelists.org'
Subject: SQL*Loader error: What is wrong here?

Hello All,  

I need some help with a SQL*Loader error.  

I am trying to execute SQL* Loader from a shell script on a directory of files by passing in the DATA command to the SQLLDR. Below, is my shell script and the control file. I am running this on 10g (Can't use External Tables since our prod is still on 8i).      

My shell script, which is very basic:

#!/bin/bash

CTLFILE=ld_inbound2.ctl

CTL_LOG=ld_inbound.log

LOGIN=user/pass_at_dev # Get this from a more secure location  

# load each inbound text files.

echo $LOGIN

echo $CTLFILE

echo $CTL_LOG  

for f in `ls i*.txt`

do

sqlldr $LOGIN CONTROL=$CTLFILE LOG=$CTL_LOG data=$f

done

exit 0  

I understand that if I pass in the DATA command, it will override the INFILE

Control file:

LOAD DATA INFILE * Append

INTO TABLE INBOUND FIELDS TERMINATED BY "," TRAILING NULLCOLS   This script is erring out on:

SQL*Loader-350: Syntax error at line 5.

Expecting "(", found end of file.  

What am I doing wrong here?

I kind-of reached a wall out on this, so if someone can shed some light on what I am doing wrong, I'll greatly appreciate it.  

Thank you in advance.  

-madhavi

This email and any attachments have been virus checked upon receipt at Ordnance Survey and are free of all known viruses.

This email is only intended for the person to whom it is addressed and may contain confidential information. If you have received this email in error, please notify the sender and delete this email which must not be copied, distributed or disclosed to any other person. Unless stated otherwise, the contents of this email are personal to the writer and do not represent the official view of Ordnance Survey. Nor can any contract be formed on Ordnance Survey's behalf via email. We reserve the right to monitor emails and attachments without prior notice.

Thank you for your cooperation.

Ordnance Survey
Romsey Road
Southampton SO16 4GU
Tel: 023 8079 2000
http://www.ordnancesurvey.co.uk

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Nov 10 2005 - 02:25:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US