Results 1 to 2 of 2

Thread: DB2 Casting

  1. #1
    Join Date
    Jul 2007
    Posts
    3

    Exclamation Unanswered: DB2 Casting

    Hi

    I'm trying to cast DECIMAL(15,2) as CHAR(23) using the following method

    v_char=CAST(v_dec AS CHAR(23));

    BUT THE CHAR value generated is appearing as "112233." How to remove
    the period(.) symbol.

    Regards,
    Abhiram

  2. #2
    Join Date
    Jul 2006
    Location
    Pune , India
    Posts
    433
    C:\Documents and Settings\deeppand>db2 values cast(cast(12.9123 as integer ) as cha
    r(23))

    1
    -----------------------
    12
    Rahul Singh
    Certified DB2 9 DBA / Application Developer

Posting Permissions

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