|
-
March 31st, 2004, 01:36 PM
#1
Comparing dates in SQL
I have a very annoying problem that probably has a simple answer but I just can't see it. In the Member table in my database is an field DateJoined representing the date a particular member joined. What I want to do is perform an update only to those members that joined after a specific date. My problem is that I can't seem to get the SQL command correct to compare the dates. Here is the full statement I have
Code:
UPDATE Member SET Balance = Balance+550 WHERE (DateJoined > 9/3/2004);
The SQL compiles fine, and it runs without error. The problem is that it updates every record in my table, not just the ones after 9/3/2004. There are records in there with dates from 2003 in there, and in fact only one record is after the date above (the reason I picked it to perform tests with). Is my statement wrong, and if so how should I fix it? (If it's of any consequence i'm using MSAcess).
Thanks in advance, Mike.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|