Sponsored Content
Full Discussion: Problem with SQL loader
Top Forums UNIX for Dummies Questions & Answers Problem with SQL loader Post 302143549 by risshanth on Friday 2nd of November 2007 01:34:08 AM
Old 11-02-2007
Question Problem with SQL loader

Hi,
I am trying to load the records in a .txt file into the data base using SQL loader. I gave:

$ sqlldr user/pass@DB control=filename.ctl log =mylog.log


It throwed the following error:

SQL*Loader-297: Invalid syntax or bind variable in SQL string for column STATUS.
ORA-01756: quoted string not properly terminated


What could be the reason ??
Follwoing is my .ctl file:

OPTIONS ( SKIP=1)
LOAD DATA
INFILE './matched.txt'
BADFILE './matched.bad'
DISCARDFILE './matched.dsc'

INTO TABLE "DATA"
APPEND

FIELDS TERMINATED BY X'9'
TRAILING NULLCOLS

(RECORD_ID "TRIM(:RECORD_ID)"
,
MATCH_LEVEL "TRIM(:MATCH_LEVEL)"
,
MATCH_IDENTIFIER "TRIM(:MATCH_IDENTIFIER)"
,
TDLINX "TRIM(:TDLINX)"
,
STORE_NAME "TRIM(:STORE_NAME)"
,
STORE_ADDRESS "TRIM(:STORE_ADDRESS)"
,
STORE_CITY "TRIM(:STORE_CITY)"
,
STORE_STATE "TRIM(:STORE_STATE)"
,
STORE_ZIP "TRIM(:STORE_ZIP)"
,
PHONE_NUMBER "TRIM(:PHONE_NUMBER)"
,
STATUS "'I'"
,
DATE_CREATED "SYSDATE"
,
USER_CREATED_BY "SYSTEM"

)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SQL loader error

Hi friends, i am getting the following error when i am using sql loader. SQL*Loader: Release 8.1.7.4.0 - Production on Tue Apr 19 13:00:07 2005 (c) Copyright 2000 Oracle Corporation. All rights reserved. SQL*Loader-704: Internal error: ulconnect: OCIServerAttach ORA-12535:... (4 Replies)
Discussion started by: sveera
4 Replies

2. Shell Programming and Scripting

A SQL Loader Script

Hi Guys, I am looking to develop a SQL Loader script that would bascially allow the user to have a txt file (or such) as an input file containing .sql scripts procedures, triggers, bascially anything against a database that could then be run automatically. Let me break it down a bit more,... (2 Replies)
Discussion started by: LiquidChild
2 Replies

3. Shell Programming and Scripting

SQL*Loader in shellscript

Hi, what is the ideal format of the file to load it into oracle table by using SQL*LOADER. The file contains six columns and the oracle table contains 15 columns. Is there any criteria that columns should be equal in no.? Can anyone help me on this, i need to use this in my shell script? ... (2 Replies)
Discussion started by: venkatesht
2 Replies

4. Shell Programming and Scripting

sql loader script

hi all i am new to shell scripting. i have 35 flat files delimited files that i have to load in to a table. i was asked to create a shell script that loads the data into the table... could you please help me if you have a script. Also .. how to create logs files...does my sql... (3 Replies)
Discussion started by: rajesh_tns
3 Replies

5. Shell Programming and Scripting

Problem in sql loader

Hi Frnds, I wanto load the data thats in data file with comma(,) delimited. it throw this errors SQL*Loader-951: Error calling once/load initialization ORA-00604: error occurred at recursive SQL level 1 ORA-00054: resource busy and acquire with NOWAIT specified Plz look at my file... (3 Replies)
Discussion started by: Gopal_Engg
3 Replies

6. UNIX for Dummies Questions & Answers

SQL*Loader

HI Experts, We have a ksh file named ldr_empdelta.ksh and it is having the SQL*LOADER script as follows. print "LOAD DATA" > $WEDB_GEN/ldrscan.ctl print "INFILE '"$LED_SCAN"/delta/led_del.dat'" >> $WEDB_GEN/ldrparms.ctl print "TRUNCATE" >> $WEDB_GEN/ldrscan.ctl print "PRESERVE BLANKS" >>... (1 Reply)
Discussion started by: ajaykumarkona
1 Replies

7. Shell Programming and Scripting

use of sql loader in the script

All, Below is the code written when sql loader loads the data: $ORACLE_EXEC_PATH/sqlldr userid=$user_passwd control=$CNTR_FILES/invoice.ctl log=$LOG_FILES/$INVOICE_FILE.log bad=$ER ROR_FILES/$INVOICE_FILE.bad data=$DATA_FILES/$INVOICE_FILE silent=FEEDBACK direct=false errors=50000 rc=$?... (1 Reply)
Discussion started by: Oracle_User
1 Replies

8. UNIX for Dummies Questions & Answers

Help Command in SQL LOADER

Which is the UNIX command to get the SQL Loader Help??:confused: (1 Reply)
Discussion started by: venkatesh sunil
1 Replies

9. Shell Programming and Scripting

Issue in SQL Loader scripts

Hi, I'm planning to load the data from FLAT files into tables. Source file: more input.txt LRNO|Bale|Horsepower|NumberOfBarges|BollardPull|NumberOfCars|GasCapacity|GrainCapacity|IndicatedHorsepower|LiquidCapacity|... (6 Replies)
Discussion started by: shyamu544
6 Replies

10. UNIX for Dummies Questions & Answers

Call SQL LOADER FROM UNIX

HI Experts, I am pretty new to scripting and i need to create a perl or shell script which should fetch a file from local directory and insert the data into a table using sql loader. This will be later added to chron job to run daily and fetch all files and load them into the table. Also i... (1 Reply)
Discussion started by: sam1234
1 Replies
SQL::Statement::Function(3)				User Contributed Perl Documentation			       SQL::Statement::Function(3)

NAME
SQL::Statement::Function - abstract base class for all function executing terms SYNOPSIS
# this class doesn't have a common constructor, because all derived classes # have their special requirements DESCRIPTION
SQL::Statement::Function is an abstract base class providing the interface for all function executing terms. INHERITANCE
SQL::Statement::Function ISA SQL::Statement::Term METHODS
DESTROY Destroys the term and undefines the weak reference to the owner as well as the reference to the parameter list. NAME
SQL::Statement::Function::UserFunc - implements executing a perl subroutine SYNOPSIS
# create an user function term with an SQL::Statement object as owner, # specifying the function name, the subroutine name (full qualified) # and the parameters to the subroutine my $term = SQL::Statement::Function::UserFunc->new( $owner, $name, $sub, @params ); # access the result of that operation $term->value( $eval ); DESCRIPTION
SQL::Statement::Function::UserFunc implements a term which returns the result of the specified subroutine. INHERITANCE
SQL::Statement::Function ISA SQL::Statement::Term METHODS
new Instantiates a new "SQL::Statement::Function::UserFunc" instance. value Invokes the given soubroutine with the values of the params and return it's result: my @params = map { $_->value($eval); } @{ $self->{PARAMS} }; return $subpkg->$subname( $self->{OWNER}, @params ); NAME
SQL::Statement::Function::NumericEval - implements numeric evaluation of a term SYNOPSIS
# create an user function term with an SQL::Statement object as owner, # specifying the expression to evaluate and the parameters to the subroutine my $term = SQL::Statement::NumericEval->new( $owner, $expr, @params ); # access the result of that operation $term->value( $eval ); DESCRIPTION
SQL::Statement::Function::NumericEval implements the numeric evaluation of a term. All parameters are expected to be numeric. INHERITANCE
SQL::Statement::Function::NumericEval ISA SQL::Statement::Function ISA SQL::Statement::Term METHODS
new Instantiates a new "SQL::Statement::Function::NumericEval" instance. Takes $owner, $expr and @params as arguments (in specified order). value Returns the result of the evaluated expression. NAME
SQL::Statement::Function::Trim - implements the built-in trim function support SYNOPSIS
# create an trim function term with an SQL::Statement object as owner, # specifying the spec, char and the parameters to the subroutine my $term = SQL::Statement::Trim->new( $owner, $spec, $char, @params ); # access the result of that operation $term->value( $eval ); DESCRIPTION
SQL::Statement::Function::Trim implements string trimming. INHERITANCE
SQL::Statement::Function::Trim ISA SQL::Statement::Function ISA SQL::Statement::Term METHODS
new Instantiates a new "SQL::Statement::Function::Trim" instance. Takes $owner, $spec, $char and @params as arguments (in specified order). Meaning of the parameters: $spec Can be on of 'LEADING', 'TRAILING' 'BOTH'. Trims the leading chars, trailing chars or at both ends, respectively. Defaults to 'BOTH'. $char The character to trim - defaults to ' ' @params Expected to be an array with exact 1 element (more aren't evaluated). value Returns the trimmed value of first parameter argument. NAME
SQL::Statement::Function::SubString - implements the built-in sub-string function support SYNOPSIS
# create an substr function term with an SQL::Statement object as owner, # specifying the start and length of the sub string to extract from the # first element of @params my $term = SQL::Statement::SubString->new( $owner, $start, $length, @params ); # access the result of that operation $term->value( $eval ); DESCRIPTION
SQL::Statement::Function::SubString implements a sub-string extraction term. INHERITANCE
SQL::Statement::Function::SubString ISA SQL::Statement::Function ISA SQL::Statement::Term METHODS
new Instantiates a new "SQL::Statement::Function::SubString" instance. Takes $owner, $start, $length and @params as arguments (in specified order). Meaning of the parameters: $start Specifies the start position to extract the sub-string. This is expected to be a SQL::Statement::Term instance. The first character in a string has the position 1. $length Specifies the length of the extracted sub-string. This is expected to be a SQL::Statement::Term instance. If omitted, everything to the end of the string is returned. @params Expected to be an array with exact 1 element (more aren't evaluated). value Returns the extracted sub-string value from first parameter argument. NAME
SQL::Statement::Function::StrConcat - implements the built-in string concatenation SYNOPSIS
# create an substr function term with an SQL::Statement object as owner # and @params to concatenate my $term = SQL::Statement::StrConcat->new( $owner, @params ); # access the result of that operation $term->value( $eval ); DESCRIPTION
SQL::Statement::Function::StrConcat implements a string concatenation term. INHERITANCE
SQL::Statement::Function::StrConcat ISA SQL::Statement::Function ISA SQL::Statement::Term METHODS
new Instantiates a new "SQL::Statement::Function::StrConcat" instance. value Returns the concatenated string composed of the parameter values. AUTHOR AND COPYRIGHT
Copyright (c) 2009,2010 by Jens Rehsack: rehsackATcpan.org All rights reserved. You may distribute this module under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. perl v5.12.1 2010-05-06 SQL::Statement::Function(3)
All times are GMT -4. The time now is 02:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy