View previous topic :: View next topic
|
Author |
Message |
KP1125
New User
Joined: 25 Jan 2017 Posts: 1 Location: India
|
|
|
|
I executed an query and the output is copied to output file but their are junk values copied. I want to remove the junk characters and copy only text
Input file :
************
ARM........
UNIT.......
ARM........
OL........
Expected output file:
*******************
ARM
UNIT
ARM
OL
I tried many options but could not remove it completely as the query output is not of fixed length.
Advice how can we do it for variable length field.[/code] |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
There is no such thing as "junk characters" or "junk values" -- period. Each and every character has a valid value in the collating sequence. The characters may not be printable but that does not mean they are "junk".
You should browse or edit the data set in hex mode so you can see precisely what the non-printing characters actually are. Once you know what they are, you can devise a way to remove them. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
An old saying " I couldn't repair your brakes, so I made your horn louder".
Being said, Correct your bad SQL (I assume query means SQL here ) , NOT to add anything you don't want than correcting anything later. If you can't do it yourself then add a new topic to DB2 section and share the problem. |
|
Back to top |
|
|
|