Solved

call user define function inside sqlldr

Posted on 2008-06-26
6
2,033 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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Can't Access My Database 57 76
constraint check 2 48
any step by steps guide on how to install Oracle 12c on Windows 10 8 55
UTL_FILE invalid file operation 5 24
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
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…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

809 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