Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Fixed-width file from unix,

AceNoviceApr 20 2010 — edited Apr 20 2010
Hi All,

I have created a script which generates FIXED-WIDTH file by executing Oracle query.
SELECT RPAD(NVL(col1,CHR(9)),20)||NVL(col2,CHR(9))||NVL(col3,CHR(9) FROM XYZ
OR
SELECT RPAD(NVL(col1,' '),20)||NVL(col2,' ')||NVL(col3,' ') FROM XYZ
It generates the data file with proper alignment. But if same file i transfer to windows server or Mainframe server, it comes with improper alignment. I have tried to change from CHR(9) to ' '. But still problem exist. Can someone help me to solve it.

Regards,
ACE
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 18 2010
Added on Apr 20 2010
7 comments
1,129 views