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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use two functions - Control file 1

Status
Not open for further replies.

AlStl

MIS
Oct 2, 2006
83
US
Hi,

How can I use two functions against single data field. Ex:

Flat file look like this:

Name, Address, Last_automobile
XXXX ,2222 , Honda
YYYY, 3333 ,NULL

Control file:

Name RTRIM:)Name),
Address TRIM:)Address),
Last_automobile RTRIM (NULLIF (Last_automobile='NULL'))

Last line is not working and causing an error. How can I use RTRIM or TRIM & NULLIF together ?

thx,

Al



 
I would suggest that you use external tables instead of SQL loader.
That way you have the full power of SQL at your disposal when loading the data.

Regards

T
 
You should use something like this


automobile NULLIF automobile ='NULL' "rtrim:)automobile)"


In order to understand recursion, you must first understand recursion.
 
taupirho & Thargy.

Thanks for your suggestions.

taupirho, your idea worked well for me. Thx a lot !!

Marking your post as valuable.

Al
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top