Delete Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

simple delete query in my database what am I doing wrong
I follow the syntax found in Delete Statement still there is an error in
syntax

Delete [Item.*]
From Item
Where Cost>50
 
Jas said:
simple delete query in my database what am I doing wrong
I follow the syntax found in Delete Statement still there is an error in
syntax

Delete [Item.*]
From Item
Where Cost>50


The square brackets are wrong. You should be able to just
leave them out:

Delete Item.*
From Item
Where Cost>50

If you had needed them, it would be:

Delete [Item].*
From [Item]
Where Cost>50
 
Jas said:
simple delete query in my database what am I doing wrong
I follow the syntax found in Delete Statement still there is an error in
syntax

Delete [Item.*]

Jas,

Try:

Delete Item.*
From Item
Where Cost>50


Sincerely,

Chris O.
 
Just to expand on Marshall's explanation. If the brackets were needed you
should have
Delete [Item].*
FROM [Item]
WHERE [Cost] > 50

Brackets are needed around names of tables and fields that contain spaces or
other special characters (such as "/?#" and other none letter characters).

Marshall Barton said:
Jas said:
simple delete query in my database what am I doing wrong
I follow the syntax found in Delete Statement still there is an error in
syntax

Delete [Item.*]
From Item
Where Cost>50


The square brackets are wrong. You should be able to just
leave them out:

Delete Item.*
From Item
Where Cost>50

If you had needed them, it would be:

Delete [Item].*
From [Item]
Where Cost>50
 
Back
Top