txt to csv conversion

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
knowledge
Participant
Posts: 101
Joined: Mon Oct 17, 2005 8:14 am

txt to csv conversion

Post 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 ...
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post 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.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
knowledge
Participant
Posts: 101
Joined: Mon Oct 17, 2005 8:14 am

Post 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..
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi,

Wont it be good to start a new topic for you new issue with proper title.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply