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: Powell, Mark D <mark.powell_at_eds.com>
Date: Thu, 10 Nov 2005 09:56:44 -0500
Message-ID: <5A14AF34CFF8AD44A44891F7C9FF41050395BBDC@usahm236.amer.corp.eds.com>


Even though the reference to a "(" would lead you to believe that the column list is the problem I believe that column lists are optional. When not present the data must match the table layout in number and position just like an insert statement values clause when no column list is used.  

If the problem is not the column list then I did not see the "BEGINDATA" keyword in the prior post. Perhaps that is the problem since the infile * keyword is being used.  

HTH -- Mark D Powell --  


From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Ian Cary (C)
Sent: Thursday, November 10, 2005 3:23 AM To: MKanugo_at_ibasis.net; oracle-l_at_freelists.org Subject: RE: SQL*Loader error: What is wrong here?

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 - 09:02:36 CST

Original text of this message

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