pi********@hotmail.com (Pieter Linden) wrote ...
Your reply is slightly confused:
Simple solution. Add an autonumber primary key to your table and
you're done.
You are assuming the table currently has no primary key, which would
be unusual (technically, it would be a heap rather than a table <g>).
You could've simply suggested adding a IDENTITY/autonumber column, but
why make it the primary key?
I think you're making a
fundamental mistake about database tables - they're *inherently
unordered*.
I think you meant to say, 'if no ORDER BY clause is specified, their
order is not guaranteed'. In practice, the 'default' order will be the
table's physical order (i.e. order on disk) which is determined by the
clustered index. For Jet, the primary key is the clustered index but
new rows are only physically reordered when the database is compacted.
Rather than rely on coincidence and default behavior, it would be
better to add an explicit row ID to the Excel data and ensure this
imported into the database.
Jamie.
--