By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,294 Members | 2,517 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,294 IT Pros & Developers. It's quick & easy.

DELETE statement

P: 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
Share this Question
Share on Google+
6 Replies


missinglinq
Expert 2.5K+
P: 3,532
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

P: 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
Expert 100+
P: 1,206
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

P: 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

P: 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

P: 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.