importing .csv file issue

skunal

Member
I have .csv file which has values as following

"abc","bb","cc","test,12","kk"
"abc","bb","cc","test,yy","kk"

I am importing this .csv file as
input value from (<file_path>)
Repeat:
import unformatted m_data
.........

End.

I am importing the data but the data marked in red is not seprated its a single value as i am using "," as a delimiter i am not able to get it has single value how can we tackle this issue.
 

Cringer

ProgressTalk.com Moderator
Staff member
You'll need to use a different character as a separator, either in the text file, or in the values. One option is to use | to separate the values as it's less likely it will be used in human input.
 

rzr

Member
How big is your data file - and what is the source? Is it comming from any external system / client / vendor into your application?
As suggested above, changing the delimiter to "|" or some ther value that is not likely to be used in human input would be a good option.
If that is not feasible then :
try ASSIGN m_data= REPLACE(m_data,'"','') after the IMPORT statement.
 

tamhas

ProgressTalk.com Sponsor
Input unformatted is the key for maximum control, but it is actually causing the problem here. If you input into five character variables it would do it automatically for you.
 
Top