dbTalk Databases Forums  

autonumber

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss autonumber in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
cbrewer2@kc.rr.com
 
Posts: n/a

Default autonumber - 01-31-2008 , 02:56 PM






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?

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: autonumber - 01-31-2008 , 04:41 PM






(cbrewer2 (AT) kc (DOT) rr.com) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #3  
Old   
--CELKO--
 
Posts: n/a

Default Re: autonumber - 01-31-2008 , 05:22 PM



Quote:
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.


Reply With Quote
  #4  
Old   
Tom van Stiphout
 
Posts: n/a

Default Re: autonumber - 01-31-2008 , 11:14 PM



On Thu, 31 Jan 2008 15:22:22 -0800 (PST), --CELKO--
<jcelko212 (AT) earthlink (DOT) net> 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.


Quote:
Neither ACCESS nor Spreadsheets are databases.


Reply With Quote
  #5  
Old   
Tom van Stiphout
 
Posts: n/a

Default Re: autonumber - 01-31-2008 , 11:20 PM



On Thu, 31 Jan 2008 12:56:15 -0800 (PST), cbrewer2 (AT) kc (DOT) 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.


Quote:
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?

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.