This content has been marked as final. Show 4 replies
You can load the data as in a stg table and the move from stg table to regular table concatenating both call_temp and call_date column together.
load data infile 'Cell_Phones.dbo.Account_Details.dat' "str '<EORD>'" into table MD_CELLPHONE.Account_Details_stg fields terminated by '<EOFD>' trailing nullcols ( Account_Number , Phone_Number , Call_temp, Call_Date ) Convert to right date format Insert into account_details (col1 , col2, col3, ...) select val1 , val2 , to_date ( val3 || ' ' || val4) ... from account_details_stg;
Edited by: OrionNet on Feb 2, 2009 5:11 PM
I suppose that would work but i am just experimenting with the BOUNDFILLER instead of just filler and i think this might be what i was looking for. Once i get it working i will follow up on this post.
If your data is in fixed format then you can use CONCATENATE and example would be something like this. Remember this works well with the fixed format
LOAD DATA INFILE '....' REPLACE CONCATENATE 2 INTO TABLE ACCOUNT_DETAILS ( col1 position(1:40) CHAR, .... col3 position(55:70) ..., -- > Thats how can combine 2 physical fields in logical field )
change the line in the control file for field Call_temp to be
(Change FILLER to BOUNDFILLER)