Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

autonumber problems

Discussion in 'Information Technology' started by alexr114, Jul 28, 2006.

  1. alexr114

    alexr114
    Expand Collapse
    Guest

    ive just imported some data from excel to an existing table which already has
    some data in it. The primary key is an autonumber which has the format of
    "COMP" @@, sofar ive had what i wanted which has been numbers of COMP 1, COMP
    2 etc. but the newly imported data has suddenly gone to 7510COMP7906. Is
    there any reason for this and can it be changed to the old format?
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News Sikhs Face Problems While Carrying Kirpans In Khyber-Pakhtunkhwa - SikhSiyasat.Net Breaking News Jul 29, 2016
    "Dasam" Granth - A Look At The Core Problems Dasam Granth Oct 21, 2015
    Problems In Life Sikh Sikhi Sikhism Apr 13, 2015
    Muslim Girl-Sikh Boy Marriage Problems- Please Help! Love & Marriage Oct 12, 2012
    Problems with Sikh Historiography-prof Jagdish Singh Sikh Video Aug 31, 2012

  3. Jerry Whittle

    Jerry Whittle
    Expand Collapse
    Guest

    The reason that the number is splitting around the COMP is that you only have
    2 ampersands. Try something like this:

    "COMP "@@@@@@@@@
    --
    Jerry Whittle
    Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


    "alexr114" wrote:

    > ive just imported some data from excel to an existing table which already has
    > some data in it. The primary key is an autonumber which has the format of
    > "COMP" @@, sofar ive had what i wanted which has been numbers of COMP 1, COMP
    > 2 etc. but the newly imported data has suddenly gone to 7510COMP7906. Is
    > there any reason for this and can it be changed to the old format?
     
  4. alexr114

    alexr114
    Expand Collapse
    Guest

    it moves the numbers to the end but still is a much bigger number. the data
    that was already there goes to COMP 151 and then the imported stuff goes
    straight to COMP 75107857. Is there anyway to make it continue from 151?

    "Jerry Whittle" wrote:

    > The reason that the number is splitting around the COMP is that you only have
    > 2 ampersands. Try something like this:
    >
    > "COMP "@@@@@@@@@
    > --
    > Jerry Whittle
    > Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
    >
    >
    > "alexr114" wrote:
    >
    > > ive just imported some data from excel to an existing table which already has
    > > some data in it. The primary key is an autonumber which has the format of
    > > "COMP" @@, sofar ive had what i wanted which has been numbers of COMP 1, COMP
    > > 2 etc. but the newly imported data has suddenly gone to 7510COMP7906. Is
    > > there any reason for this and can it be changed to the old format?
     
  5. Jerry Whittle

    Jerry Whittle
    Expand Collapse
    Guest

    Not directly. You would have to import the data into another table or link to
    the Excel spreadsheet. Then you could pour the data into the table using an
    append query.

    HOWEVER (shouting on purpose) there is no guarantee that the next autonumber
    would be sequential. Autonumbers that are primary keys are only guaranteed to
    be unique and not follow any pattern. You would need to create a function to
    create sequential numbers during the insert.

    --
    Jerry Whittle
    Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


    "alexr114" wrote:

    > it moves the numbers to the end but still is a much bigger number. the data
    > that was already there goes to COMP 151 and then the imported stuff goes
    > straight to COMP 75107857. Is there anyway to make it continue from 151?
    >
    > "Jerry Whittle" wrote:
    >
    > > The reason that the number is splitting around the COMP is that you only have
    > > 2 ampersands. Try something like this:
    > >
    > > "COMP "@@@@@@@@@
    > > --
    > > Jerry Whittle
    > > Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
    > >
    > >
    > > "alexr114" wrote:
    > >
    > > > ive just imported some data from excel to an existing table which already has
    > > > some data in it. The primary key is an autonumber which has the format of
    > > > "COMP" @@, sofar ive had what i wanted which has been numbers of COMP 1, COMP
    > > > 2 etc. but the newly imported data has suddenly gone to 7510COMP7906. Is
    > > > there any reason for this and can it be changed to the old format?
     

Share This Page