ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Can we use trim in wrkqry???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can we use trim in wrkqry???

    Hi ,

    I have two fields in file FNAME1 & FNAME2 both are firstname & lastname, I want to create a third fields using wrkqry which concatenates FNAME1 & FNAME2 with ',' in between.
    I can able to concatenate it but the problem is that spaces are coming for FNAME1 and FNAME2 which I dont want.

    Can you help me how to remove spaces of FNAME1 and FNAME2 using wrkqry.

    Note : I checked and found that we cannot use trim function in wrkqry

    Examples

    FNAME1 = SABEEH (10 bytes)
    FNAME2 = AHMED (10 bytes).

    RSLTFLD = SABEEH ,AHMED (Incorrect)

    RSLTFLD = SABEEH,AHMED (Desired Result what I want)

  • #2
    Re: Can we use trim in wrkqry???

    must you use QUERY????
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Can we use trim in wrkqry???

      Originally posted by jamief View Post
      must you use QUERY????
      better question...why the heck would you want to?
      I'm not anti-social, I just don't like people -Tommy Holden

      Comment

      Working...
      X