Results 1 to 2 of 2

Thread: Is this query correct??/

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2003
    Location
    michigan
    Posts
    70

    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

  2. #2
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    Try this
    Code:
    SELECT Sum(Poamount), Buyer 
    FROM stats 
    WHERE Buyer='Brad' AND [date] = #" & num &"# 
    GROUP BY Buyer
    ORDER BY Buyer
    Last edited by Memnoch1207; Dec 9th, 2003 at 09:05 PM.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width