reomoving prefixes in primary key values

Discussion in 'Oracle' started by kiranbvsn, Jun 30, 2007.

  1. kiranbvsn

    kiranbvsn New Member

    Joined:
    Oct 6, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    I have data in a table with primary key value .
    The primary key value has prefix with zero's.

    Example:1


    0000000001
    0000000002
    0000000003
    ...


    .....

    0000000010
    0000000011

    ....

    ...
    ....
    0000000099
    0000000100
    ----
    ---
    0000000999
    0000001000
    0000001001

    My requirment is to manuall modify the data by SQL Queries in all tables
    is to remove the prefix ZERO's.
    At present When inserting a new record for this primary key they are
    retriving the last value removing the prifx zeros and adding a value to
    that and inserting a new record with prefix's again manually


    For new record i will try to modify in java but for existing records in
    PRDOUCTION DATA Could you please suggest me to remove the prefix as..

    Example:1

    1
    2
    3
    ...


    .....

    10
    11

    ....

    ...
    ....
    99
    100
    ----
    ---
    999
    1000
    1001
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice