Home » RDBMS Server » Server Utilities » How to use two functions for a column in control file
How to use two functions for a column in control file [message #294955] Mon, 21 January 2008 00:38 Go to next message
vanathi
Messages: 74
Registered: December 2007
Location: India
Member
Hi,

I want to do two operations in a single column while loading data from csv to oracle. In control file,

accNo "translate(:accNo, '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'ZYXWVUTSRQPONMLKJIHGFEDCBA9876543210')",

This is working fine. But incase of '?' in that field, I have to replace it with null.
I tried this.

accNo "translate(:accNo, '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'ZYXWVUTSRQPONMLKJIHGFEDCBA9876543210')" "replace(:accNo, '?',NULL)",

This won't work. I want to translate and incase of '?' I want to use replace it with null.
Please advice.
Re: How to use two functions for a column in control file [message #294963 is a reply to message #294955] Mon, 21 January 2008 00:52 Go to previous message
Michel Cadot
Messages: 68658
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> select translate('A?A','A?','Z') from dual;
TR
--
ZZ

1 row selected.

TRANSLATE

Regards
Michel

[Updated on: Mon, 21 January 2008 00:53]

Report message to a moderator

Previous Topic: Have to replace ? with blank space when loading data from csv to oracle
Next Topic: Database Import failed (Error Code:IMP-00098)
Goto Forum:
  


Current Time: Tue Jun 11 19:59:23 CDT 2024