User Profile

Collapse

Profile Sidebar

Collapse
amija0311
amija0311
Last Activity: Mar 24 '08, 02:52 AM
Joined: Mar 21 '08
Location: Malaysia
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Sorry because not explain well.

    Actually i want to translate the sequence it will change string that have character to space "".

    Like 1A it will read 1 and space.

    example :-
    --------------
    CAST(LTRIM(RTRI M(TRANSLATE('1A ', ' ', 'ABCDEFGHIJKLMN OPQRSTUVWXYZ')) ) AS INTEGER)

    This query will done perfectly.

    But if the data NULL, it will got error. How to...
    See more | Go to post

    Leave a comment:


  • How to translate string with data have integer + character and null data

    Hi,

    I am new using DB2 9.1 database by windows base.
    I want to query the data that contain string then translate the string into integer using DB2.
    The problems is If the data is null, i got the problem to translate.
    How to translate string also allow null data to integer. If null data it will read as space.

    My Data :-

    Code:
    GEOSEG_ID     SEQNO      
    ----------  ---------
    329802
    ...
    See more | Go to post
    Last edited by docdiesel; Mar 22 '08, 11:36 AM. Reason: added code tags
No activity results to display
Show More
Working...