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 - Using Oracle Functions

Status
Not open for further replies.

pdtt

Programmer
Sep 24, 2002
35
CA
Hi,
whenever I try and use Oracle functions in my control files I get an Oracle error. The syntax I try is right out of a SQL loader manual. I am starting to suspect that there may be some env variables or something that are stopping SQL*Loader from finding the Oracle functions. Does anyone have any clues about the following error?

--Here is an example of a decode and to_date call in
--one of my control files.

LAST_VISIT DATE "MM/DD/YYYY" decode(LAST_VISIT,' / / ',NULL,TO_DATE(LAST_VISIT, "MM/DD/YYYY")

--Here is the Oracle error
SQL*Loader-350: Syntax error at line 24.
Expecting "," or ")", found "decode".
LAST_VISIT DATE "MM/DD/YYYY" decode(LAST_VISIT,' / / ',NULL,t

Help is much appreciated.

Thanks
 
Hi pdtt,
You need to put quotes " rounnd the decode and the column name should have a colon in front of it within the decode e.g. :LAST_VISIT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top