Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sql*Loader Help using NVL or Decode

Status
Not open for further replies.

djbjr

Programmer
Dec 7, 2001
106
US
Basically I need to replace a null value with a default value. Here is what I have done.

UNRECOVERABLE
LOAD DATA
TRUNCATE
INTO TABLE PS001.PS_EMERGENCY_PHONE (
SEQ_NUM POSITION(1:9) CHAR,
EMPLID POSITION(10:20) CHAR,
CONTACT_NAME POSITION(21:70) CHAR,
PHONE_TYPE POSITION(71:74) CHAR "decode:)phone_type, null, 'xxxx', :phone_type)",
COUNTRY_CODE POSITION(75:77) CHAR,
PHONE POSITION(78:101)CHAR)


I am trying to replace null values in phone_type to 'xxxx'

When I execute this I got the following error:

Record 1001: Rejected - Error on table PS001.PS_EMERGENCY_PHONE.
ORA-00604: error occurred at recursive SQL level 1
ORA-01031: insufficient privileges

Is this a syntax issue or do I need to change some privledges here.

thanks in advance.
 
THe user you are using to connect to the database requires INSERT privileges on PS001.PS_EMERGENCY_PHONE
 
No that wasnt the case.

My problem was I was using the key word UNRECOVERABLE.

Once I took that out. It ran fine.


I'm not sure why I was getting the privilege error.

Thank Anyway!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top