Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

call user define function inside sqlldr

Posted on 2008-06-26
6
Medium Priority
?
2,576 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 22

Assisted Solution

by:DrSQL
DrSQL earned 240 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 260 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
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.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

885 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