15 pts.
 Can we use TRIM in WRKQRY?
I am formaing up one field in Define Result Fields Field JOBNM Expression x9jbno||'/'||x9jbus||'/'||x9jbnm Here can I use TRIM function with x9jbus filed to avoid blanks If anybody knows pls let me know at pankajmahajan@hsbc.co.in

Software/Hardware used:
ASKED: March 26, 2009  9:34 AM
UPDATED: April 1, 2009  12:22 PM

Answer Wiki:
Yes, you use the VARCHAR function when defining your field <pre>VARCHAR(x9jbno)||'/'||VARCHAR(x9jbus)||'/'||VARCHAR(x9jbnm) </pre>
Last Wiki Answer Submitted:  March 26, 2009  3:19 pm  by  Vince77   20 pts.
All Answer Wiki Contributors:  Vince77   20 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi,

If you use VARCHAR you still get the blanks from your original field in your result field. If you try using LENGTH and then substring for the length of the command you also get the blanks.

I don’t think this is possible in normal Query/400 – maybe with QM Query? (afraid that’s something I don’t know too much about).

Regards,

Martin Gilbert.

 23,625 pts.

 

Yes I agree with Martin as I have tried in my Query.

One sample example I am giving you:
When I am giving

JOBNM varchar(x9jbno)||’/'||varchar(x9j
bus)||’/'||varchar(x9jbnm)

then result is coming as

043800 /Profile /LBULL10HUB

that is blank after 1st and 2nd field that is not required. I have thousands of similar data

Thanks and regards
Pankaj MAHAJAN

 15 pts.