Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2012
    Posts
    1

    Unanswered: Difficulties convert decimal to varchar in db2

    hi all
    i want convert decimal(19) to varchar(19)
    but i see sqlcode = 445
    i must convert decimal(19) to varchar(20)
    why ????

    000000 6037691725312946. 40000
    000000 6277601885430759. 106300
    000000 6037991056116662. 200000
    000000 627353106007884500 650000
    000000 6037991474553322. 80000

    after all result set" . "why ???
    i don't want . in my result set
    What can I do that my result are same as these (without" .")

    000000 6037691725312946 40000
    000000 6277601885430759 106300
    000000 6037991056116662 200000
    000000 627353106007884500 650000
    000000 6037991474553322 80000

    i can't use function (substrm)

    tnx

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You could use function REPLACE, or you could convert the DECIMAL to an BIGINT first.

    Andy

Posting Permissions

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