Four Stars

Adding a carriage return to each row of file - tFileOutputpositonal

Hi,

I am querying a database and writing the resultset to a file using tFileOutputpositional.

I need to add a carriage return towards the end of each row. Could you please let me know how to accomplish this?
I see there is a Row Separator field in tFileOutputpositional component with default as "\n". Should this be changed? If so what would this be changed to?
  • Data Integration
1 ACCEPTED SOLUTION

Accepted Solutions
Seven Stars

Re: Adding a carriage return to each row of file - tFileOutputpositonal

use "\r\n"

 

\r - new row

\n - new line

 

use it in combination. it should work.

 

else

 

try doing "\n\n", I have not tested yet, try it out.

Thanks,
Sid
Mark as solution if this resolved your issue
4 REPLIES
Seven Stars

Re: Adding a carriage return to each row of file - tFileOutputpositonal

Please follow the below screenshot. Add "\n" in your row separator property.

 

Image result for tfileoutputpositional

 

Mark as solution if this resolved your issue

Thanks,
Sid
Mark as solution if this resolved your issue
Four Stars

Re: Adding a carriage return to each row of file - tFileOutputpositonal

Hi Sid4U,

 

Thanks for replying. \n is for new line (which is the default value already available) , while I am expecting carriage return (not new line feed). I guess both are different. 

Seven Stars

Re: Adding a carriage return to each row of file - tFileOutputpositonal

use "\r\n"

 

\r - new row

\n - new line

 

use it in combination. it should work.

 

else

 

try doing "\n\n", I have not tested yet, try it out.

Thanks,
Sid
Mark as solution if this resolved your issue
Four Stars

Re: Adding a carriage return to each row of file - tFileOutputpositonal

This worked!! Thanks!