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 > control file / trunc(date)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-02-05, 03:48
shatishr shatishr is offline
Registered User
 
Join Date: Aug 2005
Location: Kuala Lumpur, MY
Posts: 108
control file / trunc(date)

Hie, I just need a small help here..
I have written this control file but then I want to truncate the dates but Im not sure how to do it
Hope anyone can help..

LOAD DATA
INFILE '/app/ITRAKPI/TRAP/TRAP_STAGE_PPB_${YYYYMMDD}.dat'
APPEND INTO TABLE trap_stage_ppb
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
CREATE_DATE DATE "yyyymmddhh24miss",
ORD_ID ,
MS_ID ,
DELIVERED_DATE DATE "yyyymmddhh24miss",
UNITS ":units / 100",
UNITS_STATE ,
CASH_TYPE ,
CHANNEL_TYPE ,
RELOAD_ID ,
DEFERRED_DATE DATE "yyyymmddhh24miss",
VP_BATCHNR ,
VP_CARDNR ,
VP_ADDITIONALINFO ,
DATE_MOD "(SELECT trunc(sysdate) FROM dual)"
)



this is how the data looks like
20051028001658,1456998,60164818602,20051028001658, 3000,0,5,9,0,,R87490,,60164818602
20051028001337,2480001,60168993370,20051028001337, 3000,0,5,9,0,,R87489,,60168993370
20051028003630,6767759,60164131668,20051028003631, 3000,0,5,9,0,,R87493,,60164131668

thanks in advance
Reply With Quote
  #2 (permalink)  
Old 11-02-05, 06:31
ducasio ducasio is offline
Registered User
 
Join Date: Aug 2004
Location: Rome, Italy
Posts: 81
Open the manual of Oracle Database Utilities or if you're lazy fo to the forum of Oracle.

you are "welcome"
Reply With Quote
  #3 (permalink)  
Old 11-14-05, 20:09
shatishr shatishr is offline
Registered User
 
Join Date: Aug 2005
Location: Kuala Lumpur, MY
Posts: 108
brother.. i tried in many many ways and thats why i posted it here...
if u say im lazy, i think posting it here and waiting for ur answer is wasting more of my time... ITS just that I cant get it and thats why im asking

maybe u can help or at least give me the proper link...
thanks...
if u feel, its troublesome for you to show me by just adding 2-3 words in the control file, then its okies... maybe someone who knows will help...

THANKKK YOUUU
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