|
-
Dec 9th, 2003, 02:10 PM
#1
Thread Starter
Lively Member
Is this query correct???
Is this query correct??
Hi I am having a date(text) in one variable.
And the format of date variable in the access database is
m/d/yyyy.
Is the following query correct to do that.
The variable num has got a date of type string sth like 7/1/2003.
And the date format in access is m/d/yyyy
SELECT Sum(Poamount),Buyer FROM stats where Buyer='Brad' and date='&num&'group by Buyer order by Buyer
-
Dec 15th, 2003, 06:24 PM
#2
Hyperactive Member
replace the &num& with #num#, assuming num is a valid date format in the format of MM/d/yyyy
-
Dec 15th, 2003, 06:32 PM
#3
Frenzied Member
here you goo
SELECT Sum(Poamount) as total,Buyer FROM stats where Buyer='Brad' and date='#num#' group by Buyer order by Buyer
-
Dec 16th, 2003, 09:40 AM
#4
Hyperactive Member
or use something like
to_date function
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
|