Solved

call user define function inside sqlldr

Posted on 2008-06-26
6
1,816 Views
Last Modified: 2013-12-18
Hi

I am trying to call user define function inside sqlldr but I am getting error

below are the details

Thanks
Control file

============
 

LOAD DATA

INTO TABLE TEMP

APPEND

FIELDS TERMINATED BY '|'

OPTIONALLY ENCLOSED BY '"'

(

TIME_RECIEVED FILLER,

FILE_LOCATION FILLER,

LOAD_DATE SYSDATE,

RUN_NUMBER "schema_name.get_run_number('process_data')"

)
 

ERROR

=====

Record 1: Rejected - Error on table TEMP, column RUN_NUMBER.

Column not found before end of logical record (use TRAILING NULLCOLS)

Open in new window

0
Comment
Question by:basirana
6 Comments
 
LVL 16

Expert Comment

by:Milleniumaire
ID: 21875769
You don't appear to actually be loading any data from the file!  Have you tried adding the TRIALING NULLCOLS option to your LOAD DATA section?
0
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 21875785
Try:

RUN_NUMBER Expression "schema_name.get_run_number('process_data')"

Open in new window

0
 

Author Comment

by:basirana
ID: 21875789
How can I add TRIALING NULLCOLS inside control file? Can you give me some example to change above code
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.

 
LVL 22

Assisted Solution

by:DrSQL
DrSQL earned 60 total points
ID: 21875805
You need to add the "expression" clause:

LOAD DATA
INTO TABLE TEMP
APPEND
FIELDS TERMINATED BY '|'
OPTIONALLY ENCLOSED BY '"'
(
TIME_RECIEVED FILLER,
FILE_LOCATION FILLER,
LOAD_DATE SYSDATE,
RUN_NUMBER EXPRESSION "schema_name.get_run_number('process_data')"
)
 
0
 
LVL 16

Accepted Solution

by:
Milleniumaire earned 65 total points
ID: 21875848
Try the following:

LOAD DATA
INTO TABLE TEMP
APPEND
FIELDS TERMINATED BY '|'
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
TIME_RECIEVED FILLER,
FILE_LOCATION FILLER,
LOAD_DATE SYSDATE,
RUN_NUMBER "schema_name.get_run_number('process_data')"
)
0
 

Author Closing Comment

by:basirana
ID: 31471017
Thanks
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.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
oracle query 15 63
Need help on Index -Oracle -Challenging question 5 44
File generation using utl_file 4 31
sql query 9 22
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

759 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

19 Experts available now in Live!

Get 1:1 Help Now