If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > uploading data with sqlloader

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-05, 06:53
shatishr shatishr is offline
Registered User
 
Join Date: Aug 2005
Location: Kuala Lumpur, MY
Posts: 108
uploading data with sqlloader

Hi all
I have a stream of data with the delimiter of ',' which looks like

20051025195506,60166710881,1000,5

I need to put this into my oracle database in the format

reload_date,msisdn,new_balance,reload_amount
10/25/2005,60166710881,10.00,5.00

the problem here is that i have written this control file
LOAD DATA
--INFILE '/app/ITRAKPI/TRAP/TRAP_RA_K1_PPB_BALANCE_YYYYMMDD'
APPEND INTO TABLE trap_ra_k1_ppb_balance
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
(
DATE_LOADED "(SELECT trunc(sysdate) FROM dual)",
WEEK_NO "(SELECT to_char(sysdate,'WW') FROM dual)",
RELOAD_DATE position (01:15) "to_date((:reload_date), 'yyyymmddhhmmss')",
MSISDN ,
RELOAD_AMOUNT ,
NEW_BALANCE
)



note: the date_loaded and week_num is something that i populate by myself and is not in the stream

i cant seem to do it because there is something wrong with the date because it contains the time as well and also need to put the decimal point while uploading
anyone could help??
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On