468,134 Members | 1,301 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,134 developers. It's quick & easy.

DELETE statement

4
Hi

I hope someone can help me with this one. I am writing a DELETE statement to run on a query I have set up called [Employees Paylsip to Home Address]. I'm trying to delete all records with a [From] and [To] date that are matching.

I'm currently getting an error message saying "The expression you entered contains invalid syntax. You may have entered an operand without an operator." - I don't even know what this last line of the message means.


Here is my incorrect SQL- (this is most likely totally all over the place as I'm flying blind here!!).



Expr1: ([DELETE]*FROM([Employees Payslip to Home Address]WHERE([From]=[To]))
Jul 26 '07 #1
6 1484
missinglinq
3,532 Expert 2GB
You have inadvertently posted your question in the Access Articles Section! I have moved it to the Access Forum.

Welcome to TheScripts!

Linq ;0)>
Jul 26 '07 #2
abolos
65
Hi

I hope someone can help me with this one. I am writing a DELETE statement to run on a query I have set up called [Employees Paylsip to Home Address]. I'm trying to delete all records with a [From] and [To] date that are matching.

I'm currently getting an error message saying "The expression you entered contains invalid syntax. You may have entered an operand without an operator." - I don't even know what this last line of the message means.


Here is my incorrect SQL- (this is most likely totally all over the place as I'm flying blind here!!).



Expr1: ([DELETE]*FROM([Employees Payslip to Home Address]WHERE([From]=[To]))
The sql statement must be like: Delete * from tblnameage where stAge between 1 and 20
Jul 26 '07 #3
JKing
1,206 Expert 1GB
Hi

I hope someone can help me with this one. I am writing a DELETE statement to run on a query I have set up called [Employees Paylsip to Home Address]. I'm trying to delete all records with a [From] and [To] date that are matching.

I'm currently getting an error message saying "The expression you entered contains invalid syntax. You may have entered an operand without an operator." - I don't even know what this last line of the message means.


Here is my incorrect SQL- (this is most likely totally all over the place as I'm flying blind here!!).



Expr1: ([DELETE]*FROM([Employees Payslip to Home Address]WHERE([From]=[To]))
I don't believe you can delete records from a query. DELETE statements are usually placed on a table. Though you may have misworded this or I've misunderstood but is [Employees Payslip to Home Address] a saved query? If so what is the table you're trying to DELETE records from? OR do you just want to filter your query so that it does not show records where [FROM] = [TO].
Jul 26 '07 #4
Carcus
4
The sql statement must be like: Delete * from tblnameage where stAge between 1 and 20

Thanks for your help with that one - I'll give that a try!
Jul 26 '07 #5
Carcus
4
I don't believe you can delete records from a query. DELETE statements are usually placed on a table. Though you may have misworded this or I've misunderstood but is [Employees Payslip to Home Address] a saved query? If so what is the table you're trying to DELETE records from? OR do you just want to filter your query so that it does not show records where [FROM] = [TO].

Thaks for your help. I was wondering about that query/table thing myself. I was trying to use the Delete statement in a query. I'll try again using it in a table. I spoke to someone who also mentioned about just adding a similar filter.


I'll go and give these a try.

Thanks again - great to get good help on my 1st posting.
Jul 26 '07 #6
Carcus
4
You have inadvertently posted your question in the Access Articles Section! I have moved it to the Access Forum.

Welcome to TheScripts!

Linq ;0)>

I think I have been shot witht the stupid gun!! Thanks for moving that for me!!
Jul 26 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

14 posts views Thread by php newbie | last post: by
4 posts views Thread by Stefan Strasser | last post: by
16 posts views Thread by robert | last post: by
4 posts views Thread by AlanAylett | last post: by
1 post views Thread by Matt | last post: by
12 posts views Thread by yufufi | last post: by
8 posts views Thread by Michel Esber | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.