Home » RDBMS Server » Server Utilities » condition on field
condition on field [message #73594] Fri, 28 May 2004 02:33 Go to next message
akif
Messages: 4
Registered: November 2002
Junior Member
Hi,

I have a plain text file which show records like this:

aa;4854;absdef;705623
aa;508564;uhyfs;5623
cc;504853;nkfos;708565
aa;856;hdbsna;244
ee;50856;erase;854
i want to truncate from second field "50" if second field starts with "50" and
truncate from fourth field "70" if fourth field starts with "70" and
append second field of between first and third character (eg. "485") to fourth field if length of fourth field equal 3 and
insert records to table which named second field of between first and third character
i mean;
SQL> select * from A_485;
aa 4854 20040519 5623
cc 4853 8465465 8565

SQL> select * from A_856;
aa 8564 8546526 5623
aa 856 658524 856244
ee 856 84652 856854

How can I write up the control file properly

sorry my english,

thanks,
Re: condition on field [message #73606 is a reply to message #73594] Tue, 01 June 2004 02:50 Go to previous messageGo to next message
sachin aggarwal
Messages: 9
Registered: June 2004
Junior Member
firstly format the field using format in sql query
then
result will be same as desired by you
for formetting help you can refer to any sql book
Re: condition on field [message #73613 is a reply to message #73606] Wed, 02 June 2004 04:49 Go to previous message
akif güngör
Messages: 4
Registered: April 2004
Junior Member
but my text file is very big, 10 GB.
i think it is not effective
and how can format in sql query?
Previous Topic: sqlldr slow loading tables with lobs
Next Topic: what is the user name and pass word in oracle 9i
Goto Forum:
  


Current Time: Tue Jul 02 13:27:49 CDT 2024