Home » RDBMS Server » Server Utilities » sql loader sum in .ctl file
sql loader sum in .ctl file [message #71994] Mon, 17 February 2003 11:15 Go to next message
kira
Messages: 6
Registered: November 2002
Junior Member
i need to load .csv file
data example
7357890000 100 100
table
735 789 0000 200

how i can make 3 fields fro one ?
how i can do sum in ctl?
Re: sql loader sum in .ctl file [message #71999 is a reply to message #71994] Tue, 18 February 2003 08:00 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
[code]hi,
you can split the first column into 3.
as shown.
but i dont know how to add 2 columns...!
---
workaround would be
crate a dummy table.
load everything to dummy table.
extract data from dummy to original table as u want.

LOAD DATA 
INFILE 'test.dat'
truncate
into  table test112
FIELDS TERMINATED BY ',' optionally enclosed by '"' trailing nullcols
(
 c1 position(1:3) integer external(3),  
 c2 position(4:6) integer external(3) , 
 c3 position(7:10) integer external(4) , 
 c4 sum (position(12:14),position(16:180))"
)

Re: sql loader sum in .ctl file [message #72001 is a reply to message #71994] Tue, 18 February 2003 09:16 Go to previous message
kira
Messages: 6
Registered: November 2002
Junior Member
the problem is that i cannot create any temp tables,
only temp files can be created.

Can i specify position for .csv data file?

thanks
Previous Topic: drop datafile first then tablespace HELP
Next Topic: How to convert Oracle 8.1.6 to oracle8.1.7
Goto Forum:
  


Current Time: Tue Dec 24 06:59:00 CST 2024