Re: Missing Semicolon Query Error
From: John Spencer (MVP) (spencer4_at_comcast.net)
Date: 09/01/04
- Next message: John Spencer (MVP): "Re: Help with update quuery"
- Previous message: fredg: "Re: Query all records within next 40 days"
- In reply to: Rone: "Missing Semicolon Query Error"
- Next in thread: Rone: "Re: Missing Semicolon Query Error"
- Reply: Rone: "Re: Missing Semicolon Query Error"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 01 Sep 2004 19:47:38 -0400
I'm not positive, but I think you may have to declare the field list you are
inserting into.
INSERT INTO alumni_profile (ID)
Values ( NZ(DMax("ID","alumni_profile"),0) + 1 )
I'm guessing on the field name since in one place you put New_ID and in another ID
Rone wrote:
>
> I keep getting the following error when running this SQL inside Access.
>
> "Missing Semicolon at the end of the SQL statement"
>
> Here is my SQL of what I want to do:
>
> INSERT INTO alumni_profile VALUES(New_ID,'First','Last','Phone')
> SELECT Nz(DMax("ID","alumni_profile"),0) + 1 As New_ID;
>
> Basically what I'm wanting to accomplish is to create a new ID for an
> "AutoNumber" field, which is incremented sequentially. When I put an ";" at
> the end I continue to get the same error.
>
> What is going wrong?
- Next message: John Spencer (MVP): "Re: Help with update quuery"
- Previous message: fredg: "Re: Query all records within next 40 days"
- In reply to: Rone: "Missing Semicolon Query Error"
- Next in thread: Rone: "Re: Missing Semicolon Query Error"
- Reply: Rone: "Re: Missing Semicolon Query Error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|