Hi,
We have a job which takes data from Oracle 9i stage and writes data to sequential file (It has only very small amount of data less than 20 rows). I am using Delimter as command and Quote as double and writing the data to the Seq. File. In the next job i am reading the seq. file and i was not getting the data properly, on ananlysis we found that in one of the column which is a character fiels has newline character (\n) in between the data which is creating problem while reading the data from the file. It reads the data of only those records which does not have the newline character and writes to the target Oracle stage another table. But i want the data to read by eliminating this new line character and write to the target.
Can anyone help me geting a correct solution for the same.
Regards,
Rajeev Prabhu
Write data to Seq. File - Remove Additional Delimeter in it
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 136
- Joined: Wed Sep 29, 2004 5:56 am
- Location: Chennai
- Contact:
If it was a Server job, I'd tell you to remove the newline in the derivation of the field by using Ereplace, for example:
This would replace all newline characters in the field with a space. I'm assuming there must be something equivalent in PX so you don't have to drop a BASIC Transformer into the job just to do something like this.
Code: Select all
EReplace(YourField,CHAR(10)," ",-1,0)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 136
- Joined: Wed Sep 29, 2004 5:56 am
- Location: Chennai
- Contact:
Hi Chulett,chulett wrote:If it was a Server job, I'd tell you to remove the newline in the derivation of the field by using Ereplace, for example:
This would replace all newline characters in the field with a space. I'm assuming there must be something equivalent in PX so you don't have to drop a BASIC Transformer into the job just to do something like this.Code: Select all
EReplace(YourField,CHAR(10)," ",-1,0)
Thankyou this is working fine in Server job, but i tried the same in PX but there is no such Function "Ereplace" in PX, can anyone given in equvalent for EReplaace that can be used in PX.
Regards,
Rajeev Prabhu
-
- Participant
- Posts: 136
- Joined: Wed Sep 29, 2004 5:56 am
- Location: Chennai
- Contact: