autonumber

autonumber

am 31.01.2008 21:56:15 von cbrewer2

I am working with a database that was created in Lotus and importing
it into Access. There are hundreds of clients in this data base that
have to be kept and maintained. My question is: Will auto numbering
work with this imported file and will it continue with the last number
that is in there and if not can I make it work and how?

Re: autonumber

am 31.01.2008 23:41:37 von Erland Sommarskog

(cbrewer2@kc.rr.com) writes:
> I am working with a database that was created in Lotus and importing
> it into Access. There are hundreds of clients in this data base that
> have to be kept and maintained. My question is: Will auto numbering
> work with this imported file and will it continue with the last number
> that is in there and if not can I make it work and how?

Run sp_help on the table, to see if it has any IDENTITY column.

If you are using SQL Server that is. If you are using Access, you should
ask in comp.databases.ms-access.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx

Re: autonumber

am 01.02.2008 00:22:22 von Joe Celko

>> There are hundreds of clients in this data base that have to be kept and maintained. My question is: Will auto numbering work with this imported file and will it continue with the last number that is in there and if not can I make it work and how? <<

Neither ACCESS nor Spreadsheets are databases. You might want to
actually do it right when you move to SQL. That would mean
normalizing your data, setting up a data dictionary, doing some data
scrubbing, etc. Auto-numbering is totally non-relational and would
have to be replaced with a real key in an RDBMS.

This is not easy and you are probably going to discover that you have
redundant and conflicting data for the same entity under different
auto-numbers. Then you will find orphaned rows where you tired to use
the auto-number like a pointer chain.

Re: autonumber

am 01.02.2008 06:14:31 von Tom van Stiphout

On Thu, 31 Jan 2008 15:22:22 -0800 (PST), --CELKO--
wrote:

I disagree that Access (better: Jet) is not a database. I guess it
depends on your definition, but by most definitions and by MSFT's
marketing materials, it *is* a database. How do you define a database?

-Tom.


>Neither ACCESS nor Spreadsheets are databases.

Re: autonumber

am 01.02.2008 06:20:04 von Tom van Stiphout

On Thu, 31 Jan 2008 12:56:15 -0800 (PST), cbrewer2@kc.rr.com wrote:

(trying to guess what you mean) Yes, if you have an AutoNumber column
in an Access (better: Jet) table and you add a new row, the autonumber
will be different than the ones you already have. You should NOT
expect it to be the next number, just different from all others. That
topic has been debated so often it should not take you much searching
groups.google.com to understand why,
If you want sequential, there are ways to do it (DMAX+1 comes to
mind), but the question remains WHY, and what to do about deleted
rows.

-Tom.


>I am working with a database that was created in Lotus and importing
>it into Access. There are hundreds of clients in this data base that
>have to be kept and maintained. My question is: Will auto numbering
>work with this imported file and will it continue with the last number
>that is in there and if not can I make it work and how?