Page 1 of 1

txt to csv conversion

Posted: Fri Sep 03, 2010 9:37 am
by knowledge
Hi ,

I am converting txt files to csv ..

I open txt file into excel 2007 , 'comma' is used as delimiter and save it as .csv.


When I open it into seq stage , I see verticle line at the end of last column , and square in the database .

I tried coping the file and pasting as special values by selecting column only ...but the same problem...

I used trim too in the last column ...

But still i see square in orace table..


please suggest ...

Am I converting txt properly....

Thanks in advance ...

Posted: Fri Sep 03, 2010 9:40 am
by kumar_s
Thats the windows (carriage return) new line character that you see.
You dont have to open the text file in Excel to convert it into csv.
If your delimiter is already Comma, you can directly save the file with ".csv" as extension.
Else change the delimter and save it.

Posted: Fri Sep 03, 2010 11:41 am
by knowledge
Thanks a lot...

I could not read the entire message as i am not the premium member , but i saved the .txt to .csv and it worked fine ...


The date is coming in '9/14/2009 3:16:16 AM' , I have

' If IsNull(trim(tdCall_From.Created_Date)) then @null else oconv(iconv(trim(tdCall_From.Created_Date),"D"),"D/YMD[4,2,2]"):' ':'00:00:00'

It is giving me invalid month error...

I do not have to load time , before (by importing txt into excel) I used to edit excel file and make every time field to date , and then use above transformation to load into oracle as the target datatype is timestamp ....


Instead of formating excel can I use 'DMTHS' including time too in the above iconv and oconve and load data...

please suggest ...

Thanks..

Posted: Tue Sep 07, 2010 8:51 am
by kumar_s
Hi,

Wont it be good to start a new topic for you new issue with proper title.