Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2006
    Posts
    2

    Unanswered: display only fixed digit numbers.

    hi...

    i have created a table "ref_nco6"
    db2 => describe table ref_nco6

    Column Type Type
    name schema name Length Scale Nulls
    ------------------------------ --------- ------------------ -------- ----- -----
    NCO_CD SYSIBM CHARACTER 6 0 No
    NCO_DET SYSIBM VARCHAR 120 0 Yes
    UID SYSIBM CHARACTER 6 0 Yes
    DT_STAMP SYSIBM TIMESTAMP 10 0 Yes

    Now in NCO_Cd there are 5 digit numbers and 6 digits numbers..and some numbers contain both digit and alphabets...

    I have to display only 6 digit numbers...
    Kindly help

  2. #2
    Join Date
    Dec 2005
    Posts
    273
    try this WHERE-clause:


    ... WHERE TRANSLATE ( NCO_CD , '000000000' , '123456789' ) = '000000'


    ( the digits from 1 to 9 are replaced by zeros. If the result are six zeros, the source was a six digits number )

  3. #3
    Join Date
    Jun 2006
    Posts
    2
    thanks....umayer...its working

  4. #4
    Join Date
    May 2006
    Posts
    1
    I want to convert a form from 9i to 6i can anyone one plz tell me how can i do that because it is giving the error rs-30200.

Posting Permissions

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