data conversion problem
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 50
- Joined: Mon Jan 21, 2008 9:35 am
data conversion problem
Hi,
I am having data as follows in the sequential file which is the source.
"39368,39399,39429","TEY/MTH10/2007","2007 October - 2007 December"
The source file is a comma separated file (CSV file). I have to load this data to an oracle table.
I could not load this to the oracle table as I am getting problem with the first field
"39368,39399,39429"
I tried specifying the datatype as number and varchar,but invain.
could someone please suggest me a way to load this data.
I am having data as follows in the sequential file which is the source.
"39368,39399,39429","TEY/MTH10/2007","2007 October - 2007 December"
The source file is a comma separated file (CSV file). I have to load this data to an oracle table.
I could not load this to the oracle table as I am getting problem with the first field
"39368,39399,39429"
I tried specifying the datatype as number and varchar,but invain.
could someone please suggest me a way to load this data.
-
- Participant
- Posts: 50
- Joined: Mon Jan 21, 2008 9:35 am
Re: data conversion problem
Did you try the above in Source or in target?hemaarvind1 wrote: I tried specifying the datatype as number and varchar,but invain.
Is your view data option showing right data as expected?
Since you have enclosed with in double quotes and assuming you have done this setting in your Seq file as well (i.e. anything enclosed with in double quotes as a one column value).
Now you can read the first column as a varchar and remove any comma's and load the data into the oracle object.
thanks!
Now you can read the first column as a varchar and remove any comma's and load the data into the oracle object.
thanks!
Syed
---------
Wait and Watch
---------
Wait and Watch
-
- Participant
- Posts: 50
- Joined: Mon Jan 21, 2008 9:35 am
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 50
- Joined: Mon Jan 21, 2008 9:35 am
-
- Participant
- Posts: 50
- Joined: Mon Jan 21, 2008 9:35 am
Re: data conversion problem
If "," is your separator then the first column will be read as a string regardless of whether or not you specify a quote character and you cannot load that value into a numeric field.hemaarvind1 wrote:...
"39368,39399,39429","TEY/MTH10/2007","2007 October - 2007 December"
Or is the data supposed to be 3 numeric fields then 2 more fields?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 50
- Joined: Mon Jan 21, 2008 9:35 am
-
- Participant
- Posts: 50
- Joined: Mon Jan 21, 2008 9:35 am