Results 1 to 3 of 3

Thread: DB2 query

  1. #1
    Join Date
    Jul 2010
    Posts
    6

    Unanswered: DB2 query

    can someone help in writing a query to convert a numeric value (right aligned) to alphanumeric value (left aligned)?

    e.g. (- means space)

    numeric value --------1800 alphanumeric 1800--------

    numeric value ------312206 alphanumeric 312206------

    numeric value --------2206 alphanumeric 2206--------

  2. #2
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    strip(digits(numeric_col),L,'0')
    Dave

  3. #3
    Join Date
    Jul 2009
    Location
    NY
    Posts
    963
    varchar(numeric_col) --- same result.

    Lenny

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •