Re: Query to duplicate last entry

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I don't know what your "ID" is but you ought to be using autonumber. What is
Version? If you look at the results you want, you are duplication names, IDs
and Versions. That's not a correct design for a table!

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@xxxxxxxxxxxxxxx




"Dan" <Dan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E4113731-06C6-4DCC-A31A-65FB9D8360C1@xxxxxxxxxxxxxxxx
Steve,
My tabe is correct? not sure I follow (why will it be incorrect?)
ID Version Name Salary
2 1 Bob 100
3 1 John 90
4 1 Dan 95

I need to be able to add a new row for any id, duplicating the entries ,
just pushing the Version number one up.

So if the parameter id ID 3
A new row will be created making my table looks like

ID Version Name Salary
2 1 Bob 100
3 1 John 90
4 1 Dan 95
3 2 John 90

Thanks


"Steve" wrote:

Dan,

Your table looks to be incorrect. Before you proceed further, why don't
you
describe what you are trying to do in your database and we can help you
get
on the right path.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@xxxxxxxxxxxxxxx




"Dan" <Dan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7C1A98A8-4B55-4540-9365-25E5A6688730@xxxxxxxxxxxxxxxx
Hi,
I need to duplicate the last entry in a table (except one field).
For example if my table is (my key is a combination of ID and Version)

ID Version Name Salary
2 1 Bob 100
3 1 John 90
4 1 Dan 95


I will need to add an entry of
4 2 Dan 95

Any idea what query/sql I should use.

Many thanks,
Dan





.



Relevant Pages

  • Re: Query to duplicate last entry
    ... Steve, That is the most stupid answer I ever saw. ... If you look at the results you want, you are duplication names, IDs ... Your table looks to be incorrect. ... I need to duplicate the last entry in a table. ...
    (microsoft.public.access.queries)
  • f0dders fabulous folly.
    ... its target audience that the mistakes being sold by f0dder are not ... Following is the test program that proves this very clearly. ... proof that prototype duplication of an API ... IAT Entry ...
    (alt.lang.asm)
  • Simplified Data Entry
    ... duplicated entries and try to prevent operator entry errors. ... This data is entered weekly at the moment to avoid duplication but I ... Clients may have more than one a/c but the weekly amount may change but ... provided the a/c is already present in a previous ...
    (microsoft.public.excel.misc)
  • Re: Inserting multiple rows in one entry
    ... I believe I understand "what" you are trying to do (insert multiple rows in ... solve by having all the duplication of values your post implies? ... > Once the 1st entry is recorded in the table, I compute the next 7 rows ... > cause unnecessary problems because the Registration_ID is the most key ...
    (microsoft.public.access.formscoding)
  • Re: Inserting multiple rows in one entry
    ... It sounds like there is a duplication involved but actually there is not. ... just went back and checked the database table how the data is stored. ... >> Access Gurus, ... >> Compute for 2nd entry: ...
    (microsoft.public.access.formscoding)